Revert r245635, "[InstCombine] Transform A & (L - 1) u< L --> L != 0"
[oota-llvm.git] / lib / Transforms / InstCombine / InstCombineCompares.cpp
index dbf43f7769cfcc33b8753826d7af1c195193f113..9ce1c3fc41b302126f33943cd0d1610a0c3b8749 100644 (file)
@@ -3490,19 +3490,6 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) {
       }
       }
     }
-
-    if (BO0) {
-      // Transform  A & (L - 1) `ult` L --> L != 0
-      Value *L;
-      auto LSubOne = m_Add(m_Value(L), m_AllOnes());
-      auto BitwiseAnd =
-          m_CombineOr(m_And(m_Value(), LSubOne), m_And(LSubOne, m_Value()));
-
-      if (match(BO0, BitwiseAnd) && I.getPredicate() == ICmpInst::ICMP_ULT) {
-        auto *Zero = Constant::getNullValue(BO0->getType());
-        return new ICmpInst(ICmpInst::ICMP_NE, L, Zero);
-      }
-    }
   }
 
   { Value *A, *B;