[llvm-commits] [llvm] r151694 - /llvm/trunk/test/Transforms/InstCombine/2012-02-28-ICmp.ll

Bill Wendling isanbard at gmail.com
Tue Feb 28 17:53:13 PST 2012


Author: void
Date: Tue Feb 28 19:53:13 2012
New Revision: 151694

URL: http://llvm.org/viewvc/llvm-project?rev=151694&view=rev
Log:
Testcase for r151691.

Added:
    llvm/trunk/test/Transforms/InstCombine/2012-02-28-ICmp.ll

Added: llvm/trunk/test/Transforms/InstCombine/2012-02-28-ICmp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2012-02-28-ICmp.ll?rev=151694&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/2012-02-28-ICmp.ll (added)
+++ llvm/trunk/test/Transforms/InstCombine/2012-02-28-ICmp.ll Tue Feb 28 19:53:13 2012
@@ -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
+}





More information about the llvm-commits mailing list