diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-02-29 01:53:13 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-02-29 01:53:13 +0000 |
commit | 7f9f5680ca44aec955cbb42bfa0048d57c9a711a (patch) | |
tree | b1ff911ca18a2b523abae5b478077d5152297571 | |
parent | 1cf107c4332b34a23d82b7a4ed99636a577725fe (diff) | |
download | bcm5719-llvm-7f9f5680ca44aec955cbb42bfa0048d57c9a711a.tar.gz bcm5719-llvm-7f9f5680ca44aec955cbb42bfa0048d57c9a711a.zip |
Testcase for r151691.
llvm-svn: 151694
-rw-r--r-- | llvm/test/Transforms/InstCombine/2012-02-28-ICmp.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/2012-02-28-ICmp.ll b/llvm/test/Transforms/InstCombine/2012-02-28-ICmp.ll new file mode 100644 index 00000000000..82cf85fa4cd --- /dev/null +++ b/llvm/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 +} |