diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-08-28 23:48:31 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-08-28 23:48:31 +0000 |
commit | 4d46d0af583b95a5d4f7d490f542c4fb65b9e824 (patch) | |
tree | 0384768491997c341ecb57a52b9e1cf7a299f65b /test/CodeGen/X86/cmp2.ll | |
parent | 37f25d989a3054b4742f6c92af94a312c26ffb2b (diff) | |
download | external_llvm-4d46d0af583b95a5d4f7d490f542c4fb65b9e824.zip external_llvm-4d46d0af583b95a5d4f7d490f542c4fb65b9e824.tar.gz external_llvm-4d46d0af583b95a5d4f7d490f542c4fb65b9e824.tar.bz2 |
Swap fp comparison operands and change predicate to allow load folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/cmp2.ll')
-rw-r--r-- | test/CodeGen/X86/cmp2.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/X86/cmp2.ll b/test/CodeGen/X86/cmp2.ll new file mode 100644 index 0000000..cc4027e --- /dev/null +++ b/test/CodeGen/X86/cmp2.ll @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep ucomisd | grep CPI | count 2 + +define i32 @test(double %A) nounwind { + entry: + %tmp2 = fcmp ogt double %A, 1.500000e+02; <i1> [#uses=1] + %tmp5 = fcmp olt double %A, 7.500000e+01; <i1> [#uses=1] + %bothcond = or i1 %tmp2, %tmp5; <i1> [#uses=1] + br i1 %bothcond, label %bb8, label %bb12 + + bb8:; preds = %entry + %tmp9 = tail call i32 (...)* @foo( ) nounwind ; <i32> [#uses=1] + ret i32 %tmp9 + + bb12:; preds = %entry + ret i32 32 +} + +declare i32 @foo(...) |