diff --git a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp index 6e09dec198c2..2e44ee8f20b7 100644 --- a/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp +++ b/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp @@ -360,7 +360,7 @@ void InductiveRangeCheck::extractRangeChecksFromCond( return; // TODO: Do the same for OR, XOR, NOT etc? - if (match(Condition, m_And(m_Value(), m_Value()))) { + if (match(Condition, m_LogicalAnd(m_Value(), m_Value()))) { extractRangeChecksFromCond(L, SE, cast(Condition)->getOperandUse(0), Checks, Visited); extractRangeChecksFromCond(L, SE, cast(Condition)->getOperandUse(1),