diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-06-06 07:13:17 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-06-06 07:13:17 +0000 |
commit | aa9a24bd8be8b86b7ba042317d56bba5da2d9e83 (patch) | |
tree | ff0eafba816b5561bc62c6685746ca03b8c28bfb /llvm/lib | |
parent | 3002d5b0bf6f2556e74bf6777e951736ff3f9b1e (diff) | |
download | bcm5719-llvm-aa9a24bd8be8b86b7ba042317d56bba5da2d9e83.tar.gz bcm5719-llvm-aa9a24bd8be8b86b7ba042317d56bba5da2d9e83.zip |
[InstSimplify] Remove some redundant code from InstSimplify now that llvm::isKnownNonEqual handles vectors.
isKnownNonEqual is called a little earlier in this function and can handle the case that we were checking here as well as more complex cases.
llvm-svn: 304775
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Analysis/InstructionSimplify.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp index 55ced969d13..ea83c83ed0c 100644 --- a/llvm/lib/Analysis/InstructionSimplify.cpp +++ b/llvm/lib/Analysis/InstructionSimplify.cpp @@ -3358,19 +3358,6 @@ static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS, } } - // If a bit is known to be zero for A and known to be one for B, - // then A and B cannot be equal. - if (ICmpInst::isEquality(Pred)) { - const APInt *RHSVal; - if (match(RHS, m_APInt(RHSVal))) { - KnownBits LHSKnown = computeKnownBits(LHS, Q.DL, /*Depth=*/0, Q.AC, Q.CxtI, Q.DT); - if (LHSKnown.Zero.intersects(*RHSVal) || - !LHSKnown.One.isSubsetOf(*RHSVal)) - return Pred == ICmpInst::ICMP_EQ ? ConstantInt::getFalse(ITy) - : ConstantInt::getTrue(ITy); - } - } - // If the comparison is with the result of a select instruction, check whether // comparing with either branch of the select always yields the same value. if (isa<SelectInst>(LHS) || isa<SelectInst>(RHS)) |