summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-02-29 01:53:13 +0000
committerBill Wendling <isanbard@gmail.com>2012-02-29 01:53:13 +0000
commit37c02bce277078902924af897736d87bb0b106a0 (patch)
tree8380f4ae557dbe0330133eae774b7cab6e6011ab /test
parente1b66f11459c7f1523939fb6ac1dfdc93e1d26ef (diff)
downloadllvm-37c02bce277078902924af897736d87bb0b106a0.tar.gz
llvm-37c02bce277078902924af897736d87bb0b106a0.tar.bz2
llvm-37c02bce277078902924af897736d87bb0b106a0.tar.xz
Testcase for r151691.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/2012-02-28-ICmp.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2012-02-28-ICmp.ll b/test/Transforms/InstCombine/2012-02-28-ICmp.ll
new file mode 100644
index 0000000000..82cf85fa4c
--- /dev/null
+++ b/test/Transforms/InstCombine/2012-02-28-ICmp.ll
@@ -0,0 +1,19 @@
+; RUN: opt < %s -instcombine -S | FileCheck %s
+; <rdar://problem/10803154>
+
+; There should be no transformation.
+; CHECK: %a = trunc i32 %x to i8
+; CHECK: %b = icmp ne i8 %a, 0
+; CHECK: %c = and i32 %x, 16711680
+; CHECK: %d = icmp ne i32 %c, 0
+; CHECK: %e = and i1 %b, %d
+; CHECK: ret i1 %e
+
+define i1 @f1(i32 %x) {
+ %a = trunc i32 %x to i8
+ %b = icmp ne i8 %a, 0
+ %c = and i32 %x, 16711680
+ %d = icmp ne i32 %c, 0
+ %e = and i1 %b, %d
+ ret i1 %e
+}