Skip to content

Commit 5312408

Browse files
committed
LAA: update inbounds comments
1 parent 5e22ca2 commit 5312408

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,7 @@ static bool isNoWrapAddRec(Value *Ptr, const SCEVAddRecExpr *AR,
14121412
// Look through the potentially overflowing instruction to try to prove
14131413
// non-wrapping for the *specific* value of Ptr.
14141414

1415-
// The arithmetic implied by an inbounds GEP can't overflow.
1415+
// The arithmetic implied by an nusw GEP can't overflow.
14161416
const auto *GEP = dyn_cast<GetElementPtrInst>(Ptr);
14171417
if (!GEP || !GEP->hasNoUnsignedSignedWrap())
14181418
return false;
@@ -1516,7 +1516,7 @@ llvm::getPtrStride(PredicatedScalarEvolution &PSE, Type *AccessTy, Value *Ptr,
15161516
if (isNoWrapAddRec(Ptr, AR, PSE, Lp))
15171517
return Stride;
15181518

1519-
// An inbounds getelementptr that is a AddRec with a unit stride
1519+
// An nusw getelementptr that is a AddRec with a unit stride
15201520
// cannot wrap per definition. If it did, the result would be poison
15211521
// and any memory access dependent on it would be immediate UB
15221522
// when executed.

0 commit comments

Comments
 (0)