Skip to content

Commit 81b23c3

Browse files
committed
!fixup address comments, thanks!
1 parent 19ae5af commit 81b23c3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Analysis/ScalarEvolution.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3220,11 +3220,10 @@ const SCEV *ScalarEvolution::getMulExpr(SmallVectorImpl<const SCEV *> &Ops,
32203220
// D is a multiple of C2, and C1 is a multiple of C1.
32213221
const SCEV *D;
32223222
const SCEVConstant *C2;
3223-
APInt LHSV = LHSC->getAPInt();
3223+
const APInt &LHSV = LHSC->getAPInt();
32243224
if (LHSV.isPowerOf2() &&
32253225
match(Ops[1], m_scev_UDiv(m_SCEV(D), m_SCEVConstant(C2))) &&
3226-
C2->getAPInt().isPowerOf2() &&
3227-
LHSV.logBase2() >= C2->getAPInt().logBase2() &&
3226+
C2->getAPInt().isPowerOf2() && LHSV.uge(C2->getAPInt()) &&
32283227
LHSV.logBase2() <= getMinTrailingZeros(D)) {
32293228
return getMulExpr(getUDivExpr(LHSC, C2), D);
32303229
}

0 commit comments

Comments
 (0)