diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-10-28 01:44:26 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-10-28 01:44:26 +0000 |
commit | 4a609f3cefe5f62fbaa3c07771fa90a2d28051f8 (patch) | |
tree | 6ff8e540a89f4396d234c8aeab3d48731fc82965 /llvm/test/CodeGen/ARM/fpconsts.ll | |
parent | 83896a59e138700045bbf18753bfa5aaf2f59b98 (diff) | |
download | bcm5719-llvm-4a609f3cefe5f62fbaa3c07771fa90a2d28051f8.tar.gz bcm5719-llvm-4a609f3cefe5f62fbaa3c07771fa90a2d28051f8.zip |
Use fconsts and fconstd to materialize small fp constants.
llvm-svn: 85362
Diffstat (limited to 'llvm/test/CodeGen/ARM/fpconsts.ll')
-rw-r--r-- | llvm/test/CodeGen/ARM/fpconsts.ll | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/fpconsts.ll b/llvm/test/CodeGen/ARM/fpconsts.ll new file mode 100644 index 00000000000..6a3a6d815d8 --- /dev/null +++ b/llvm/test/CodeGen/ARM/fpconsts.ll @@ -0,0 +1,33 @@ +; RUN: llc < %s -march=arm -mattr=+vfp3 | FileCheck %s + +define arm_apcscc float @t1(float %x) nounwind readnone optsize { +entry: +; CHECK: t1: +; CHECK: fconsts s1, 16 + %0 = fadd float %x, 4.000000e+00 + ret float %0 +} + +define arm_apcscc double @t2(double %x) nounwind readnone optsize { +entry: +; CHECK: t2: +; CHECK: fconstd d1, 8 + %0 = fadd double %x, 3.000000e+00 + ret double %0 +} + +define arm_apcscc double @t3(double %x) nounwind readnone optsize { +entry: +; CHECK: t3: +; CHECK: fconstd d1, 170 + %0 = fmul double %x, -1.300000e+01 + ret double %0 +} + +define arm_apcscc float @t4(float %x) nounwind readnone optsize { +entry: +; CHECK: t4: +; CHECK: fconsts s1, 184 + %0 = fmul float %x, -2.400000e+01 + ret float %0 +} |