aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-06-28 21:30:07 +0000
committerDan Gohman <gohman@apple.com>2010-06-28 21:30:07 +0000
commit0dd3549edc91b50fba102a6b0473caf8d4cf6b70 (patch)
treeb560a260051ce541b2ca74278734edd8f0af8dec /test/Transforms
parente89c5e57cc5c525d7875032a125e37bd404448c2 (diff)
downloadexternal_llvm-0dd3549edc91b50fba102a6b0473caf8d4cf6b70.zip
external_llvm-0dd3549edc91b50fba102a6b0473caf8d4cf6b70.tar.gz
external_llvm-0dd3549edc91b50fba102a6b0473caf8d4cf6b70.tar.bz2
Constant fold x == undef to undef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107074 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/InstCombine/icmp.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/icmp.ll b/test/Transforms/InstCombine/icmp.ll
index 29997bf..802957f 100644
--- a/test/Transforms/InstCombine/icmp.ll
+++ b/test/Transforms/InstCombine/icmp.ll
@@ -131,3 +131,26 @@ entry:
; CHECK: ret i1 false
}
+define i1 @test14(i8 %X) nounwind readnone {
+entry:
+ %cmp = icmp slt i8 undef, -128
+ ret i1 %cmp
+; CHECK: @test14
+; CHECK: ret i1 false
+}
+
+define i1 @test15() nounwind readnone {
+entry:
+ %cmp = icmp eq i8 undef, -128
+ ret i1 %cmp
+; CHECK: @test15
+; CHECK: ret i1 undef
+}
+
+define i1 @test16() nounwind readnone {
+entry:
+ %cmp = icmp ne i8 undef, -128
+ ret i1 %cmp
+; CHECK: @test16
+; CHECK: ret i1 undef
+}