From: Diana Picus Date: Fri, 17 Feb 2017 11:25:11 +0000 (+0000) Subject: [ARM] GlobalISel: Add end-to-end tests for double X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44c483f8381f875e6e883d3c185a9dd0349d7bb7;p=llvm [ARM] GlobalISel: Add end-to-end tests for double Test some really basic functionality through the whole GlobalISel pipeline. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295438 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/ARM/GlobalISel/arm-isel.ll b/test/CodeGen/ARM/GlobalISel/arm-isel.ll index 9790208befc..1c7e7aca497 100644 --- a/test/CodeGen/ARM/GlobalISel/arm-isel.ll +++ b/test/CodeGen/ARM/GlobalISel/arm-isel.ll @@ -160,3 +160,24 @@ entry: %v = fadd float %f0, %f1 ret float %v } + +define arm_aapcs_vfpcc double @test_double_hard(double %f0, double %f1) { +; CHECK-LABEL: test_double_hard: +; CHECK: vadd.f64 d0, d0, d1 +; CHECK: bx lr +entry: + %v = fadd double %f0, %f1 + ret double %v +} + +define arm_aapcscc double @test_double_softfp(double %f0, double %f1) { +; CHECK-LABEL: test_double_softfp: +; CHECK-DAG: vmov [[F0:d[0-9]+]], r0, r1 +; CHECK-DAG: vmov [[F1:d[0-9]+]], r2, r3 +; CHECK: vadd.f64 [[FV:d[0-9]+]], [[F0]], [[F1]] +; CHECK: vmov r0, r1, [[FV]] +; CHECK: bx lr +entry: + %v = fadd double %f0, %f1 + ret double %v +}