diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-03-31 10:12:15 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-03-31 10:12:15 +0000 |
| commit | 0db50189dcde3408134e9011052ed8b731ec303a (patch) | |
| tree | 3b0ab5bfc16905ec88b7b548951e7578c3ca40d0 /test/Transforms | |
| parent | b194bdc03b6aa932ba4f719a8aa02db8d498f364 (diff) | |
| download | external_llvm-0db50189dcde3408134e9011052ed8b731ec303a.zip external_llvm-0db50189dcde3408134e9011052ed8b731ec303a.tar.gz external_llvm-0db50189dcde3408134e9011052ed8b731ec303a.tar.bz2 | |
InstCombine: fold fcmp pred (fneg x), C -> fcmp swap(pred) x, -C
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128626 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
| -rw-r--r-- | test/Transforms/InstCombine/fcmp.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/fcmp.ll b/test/Transforms/InstCombine/fcmp.ll index 49bd507..f869a18 100644 --- a/test/Transforms/InstCombine/fcmp.ll +++ b/test/Transforms/InstCombine/fcmp.ll @@ -32,3 +32,11 @@ define i1 @test4(float %a) nounwind { ; CHECK: @test4 ; CHECK-NEXT: fpext float %a to double } + +define i1 @test5(float %a) nounwind { + %neg = fsub float -0.000000e+00, %a + %cmp = fcmp ogt float %neg, 1.000000e+00 + ret i1 %cmp +; CHECK: @test5 +; CHECK-NEXT: fcmp olt float %a, -1.0 +} |
