InstSimplify: Try to bring back the rest of r223583
This reverts r223624 with a small tweak, hopefully this will make stage3
equivalent.
llvm-svn: 223679
diff --git a/llvm/test/Transforms/InstSimplify/AndOrXor.ll b/llvm/test/Transforms/InstSimplify/AndOrXor.ll
index c01c53e..ce3c2aa 100644
--- a/llvm/test/Transforms/InstSimplify/AndOrXor.ll
+++ b/llvm/test/Transforms/InstSimplify/AndOrXor.ll
@@ -166,6 +166,15 @@
; CHECK: %[[cmp:.*]] = icmp ult i32 %x, %y
; CHECK: ret i1 %[[cmp]]
+define i1 @and_icmp2(i32 %x, i32 %y) {
+ %1 = icmp ult i32 %x, %y
+ %2 = icmp eq i32 %y, 0
+ %3 = and i1 %1, %2
+ ret i1 %3
+}
+; CHECK-LABEL: @and_icmp2(
+; CHECK: ret i1 false
+
define i1 @or_icmp1(i32 %x, i32 %y) {
%1 = icmp ult i32 %x, %y
%2 = icmp ne i32 %y, 0