aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/ARM/fcopysign.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-01-19 09:20:23 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-01-19 09:20:23 +0000
commit02b985c50faa7b0f43ef4100761c633ed4b8d6d2 (patch)
tree0d21bd626b6931c8fd248b5094331f5bb53f3b54 /test/CodeGen/ARM/fcopysign.ll
parenta8e2989ece6dc46df59b0768184028257f913843 (diff)
downloadexternal_llvm-02b985c50faa7b0f43ef4100761c633ed4b8d6d2.zip
external_llvm-02b985c50faa7b0f43ef4100761c633ed4b8d6d2.tar.gz
external_llvm-02b985c50faa7b0f43ef4100761c633ed4b8d6d2.tar.bz2
ARM test cases contributed by Apple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33354 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/fcopysign.ll')
-rw-r--r--test/CodeGen/ARM/fcopysign.ll32
1 files changed, 15 insertions, 17 deletions
diff --git a/test/CodeGen/ARM/fcopysign.ll b/test/CodeGen/ARM/fcopysign.ll
index 66b639e..12ea32c 100644
--- a/test/CodeGen/ARM/fcopysign.ll
+++ b/test/CodeGen/ARM/fcopysign.ll
@@ -1,21 +1,19 @@
-; RUN: llvm-as < %s | llc -march=arm
+; RUN: llvm-as < fcopysign.ll | llc -march=arm &&
+; RUN: llvm-as < fcopysign.ll | llc -march=arm | grep bic | wc -l | grep 2 &&
+; RUN: llvm-as < fcopysign.ll | llc -march=arm -mattr=+v6,+vfp2 &&
+; RUN: llvm-as < fcopysign.ll | llc -march=arm -mattr=+v6,+vfp2 | grep fneg | wc -l | grep 2
-define csretcc void %__divsc3({ float, float }* %agg.result, float %a, float %b, float %c, float %d) {
-entry:
- br i1 false, label %bb, label %cond_next375
-
-bb: ; preds = %entry
- %tmp81 = tail call float %copysignf( float 0x7FF0000000000000, float %c ) ; <float> [#uses=1]
- %tmp87 = mul float %tmp81, %b ; <float> [#uses=1]
- br label %cond_next375
-
-cond_next375: ; preds = %bb, %entry
- %y.1 = phi float [ %tmp87, %bb ], [ 0.000000e+00, %entry ] ; <float> [#uses=0]
- ret void
+define float %test1(float %x, double %y) {
+ %tmp = fpext float %x to double
+ %tmp2 = tail call double %copysign( double %tmp, double %y )
+ %tmp2 = fptrunc double %tmp2 to float
+ ret float %tmp2
}
-declare float %fabsf(float)
-
-declare i1 %llvm.isunordered.f32(float, float)
+define double %test2(double %x, float %y) {
+ %tmp = fpext float %y to double
+ %tmp2 = tail call double %copysign( double %x, double %tmp )
+ ret double %tmp2
+}
-declare float %copysignf(float, float)
+declare double %copysign(double, double)