diff --git a/llvm/lib/Support/KnownBits.cpp b/llvm/lib/Support/KnownBits.cpp --- a/llvm/lib/Support/KnownBits.cpp +++ b/llvm/lib/Support/KnownBits.cpp @@ -271,9 +271,6 @@ Optional KnownBits::eq(const KnownBits &LHS, const KnownBits &RHS) { if (LHS.isConstant() && RHS.isConstant()) return Optional(LHS.getConstant() == RHS.getConstant()); - if (LHS.getMaxValue().ult(RHS.getMinValue()) || - LHS.getMinValue().ugt(RHS.getMaxValue())) - return Optional(false); if (LHS.One.intersects(RHS.Zero) || RHS.One.intersects(LHS.Zero)) return Optional(false); return None; @@ -286,8 +283,6 @@ } Optional KnownBits::ugt(const KnownBits &LHS, const KnownBits &RHS) { - if (LHS.isConstant() && RHS.isConstant()) - return Optional(LHS.getConstant().ugt(RHS.getConstant())); // LHS >u RHS -> false if umax(LHS) <= umax(RHS) if (LHS.getMaxValue().ule(RHS.getMinValue())) return Optional(false); @@ -312,8 +307,6 @@ } Optional KnownBits::sgt(const KnownBits &LHS, const KnownBits &RHS) { - if (LHS.isConstant() && RHS.isConstant()) - return Optional(LHS.getConstant().sgt(RHS.getConstant())); // LHS >s RHS -> false if smax(LHS) <= smax(RHS) if (LHS.getSignedMaxValue().sle(RHS.getSignedMinValue())) return Optional(false);