diff options
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index 25587739806..f9a7eb2a512 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -2009,16 +2009,6 @@ Instruction *InstCombiner::foldICmpShlConstant(ICmpInst &Cmp, Instruction *Shl, ICmpInst::Predicate Pred = Cmp.getPredicate(); Value *X = Shl->getOperand(0); if (Cmp.isEquality()) { - // If we are comparing against bits always shifted out, the comparison - // cannot succeed. - Constant *Comp = - ConstantExpr::getShl(ConstantExpr::getLShr(RHS, ShAmt), ShAmt); - if (Comp != RHS) { // Comparing against a bit that we know is zero. - bool IsICMP_NE = Pred == ICmpInst::ICMP_NE; - Constant *Cst = Builder->getInt1(IsICMP_NE); - return replaceInstUsesWith(Cmp, Cst); - } - // If the shift is NUW, then it is just shifting out zeros, no need for an // AND. if (cast<BinaryOperator>(Shl)->hasNoUnsignedWrap()) |

