From: NAKAMURA Takumi Date: Mon, 8 Dec 2014 02:07:22 +0000 (+0000) Subject: Revert a part of r223583, for now. It seems causing different emission between stage2... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=e4a5390406b430729dcf7c5eacb8e4083a656ac0 Revert a part of r223583, for now. It seems causing different emission between stage2(gcc-clang) and stage3 clang. Investigating. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223624 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp index e58998897c2..5c536aa79c4 100644 --- a/lib/Analysis/InstructionSimplify.cpp +++ b/lib/Analysis/InstructionSimplify.cpp @@ -1476,11 +1476,6 @@ static Value *simplifyUnsignedRangeCheck(ICmpInst *ZeroICmp, return UnsignedICmp; } - // X < Y && Y == 0 --> false - if (UnsignedPred == ICmpInst::ICMP_ULT && EqPred == ICmpInst::ICMP_EQ && - IsAnd) - return getFalse(UnsignedICmp->getType()); - return nullptr; } diff --git a/test/Transforms/InstSimplify/AndOrXor.ll b/test/Transforms/InstSimplify/AndOrXor.ll index ce3c2aa6af2..c01c53ec4e1 100644 --- a/test/Transforms/InstSimplify/AndOrXor.ll +++ b/test/Transforms/InstSimplify/AndOrXor.ll @@ -166,15 +166,6 @@ define i1 @and_icmp1(i32 %x, i32 %y) { ; 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