Skip to content

Commit 842564e

Browse files
committed
!fixup use getAddExpr taking 2 SCEVs.
1 parent b271f0a commit 842564e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Analysis/ScalarEvolution.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,9 +1798,9 @@ const SCEV *ScalarEvolution::getZeroExtendExprImpl(const SCEV *Op, Type *Ty,
17981798
// zext (C + A)<nsw> -> (sext(C) + sext(A))<nsw> if zext (C + A)<nsw> >=s 0.
17991799
if (SA->hasNoSignedWrap() && isKnownNonNegative(SA) &&
18001800
match(SA, m_scev_Add(m_SCEVConstant(C), m_SCEV(A)))) {
1801-
SmallVector<const SCEV *, 4> Ops = {getSignExtendExpr(C, Ty, Depth + 1),
1802-
getSignExtendExpr(A, Ty, Depth + 1)};
1803-
return getAddExpr(Ops, SCEV::FlagNSW, Depth + 1);
1801+
return getAddExpr(getSignExtendExpr(C, Ty, Depth + 1),
1802+
getSignExtendExpr(A, Ty, Depth + 1), SCEV::FlagNSW,
1803+
Depth + 1);
18041804
}
18051805

18061806
// zext(C + x + y + ...) --> (zext(D) + zext((C - D) + x + y + ...))

0 commit comments

Comments
 (0)