summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/fcmp.ll
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-03-31 10:12:22 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-03-31 10:12:22 +0000
commitd159d946449def169bff0fc86e0f6b20d59cf475 (patch)
treeaec06be04987a76b5d655a7162d65ea6ee7f6517 /llvm/test/Transforms/InstCombine/fcmp.ll
parenta8c5d0872d64a5ae3deaa7ed839a00f72169d3b2 (diff)
downloadbcm5719-llvm-d159d946449def169bff0fc86e0f6b20d59cf475.tar.gz
bcm5719-llvm-d159d946449def169bff0fc86e0f6b20d59cf475.zip
InstCombine: fold fcmp (fneg x), (fneg y) -> fcmp x, y
llvm-svn: 128627
Diffstat (limited to 'llvm/test/Transforms/InstCombine/fcmp.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/fcmp.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/fcmp.ll b/llvm/test/Transforms/InstCombine/fcmp.ll
index f869a18992d..66607ea0017 100644
--- a/llvm/test/Transforms/InstCombine/fcmp.ll
+++ b/llvm/test/Transforms/InstCombine/fcmp.ll
@@ -40,3 +40,12 @@ define i1 @test5(float %a) nounwind {
; CHECK: @test5
; CHECK-NEXT: fcmp olt float %a, -1.0
}
+
+define i1 @test6(float %x, float %y) nounwind {
+ %neg1 = fsub float -0.000000e+00, %x
+ %neg2 = fsub float -0.000000e+00, %y
+ %cmp = fcmp ogt float %neg1, %neg2
+ ret i1 %cmp
+; CHECK: @test6
+; CHECK-NEXT: fcmp ogt float %x, %y
+}
OpenPOWER on IntegriCloud