Skip to content

Commit ec4b5ec

Browse files
committed
[LA] Fix a nit, comment
1 parent c842b7f commit ec4b5ec

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,8 +1104,8 @@ static iterator_range<PointerIntPair<const SCEV *, 1, bool> *> getRTCheckPtrs(
11041104
// assumptions might have been added to PSE, resulting in simplifications.
11051105
const SCEV *S = replaceSymbolicStrideSCEV(PSE, StridesMap, Ptr);
11061106
auto *SAR = dyn_cast<SCEVAddRecExpr>(S);
1107-
1108-
if (auto *PtrVal = SAR ? SAR : AR; PtrVal && PtrVal->isAffine())
1107+
auto *PtrVal = SAR ? SAR : AR;
1108+
if (PtrVal && PtrVal->isAffine())
11091109
P.setPointer(PtrVal);
11101110
else if (!PSE.getSE()->isLoopInvariant(P.getPointer(), L))
11111111
return {ForkedSCEVs.end(), ForkedSCEVs.end()};
@@ -1123,7 +1123,8 @@ static iterator_range<PointerIntPair<const SCEV *, 1, bool> *> getRTCheckPtrs(
11231123
auto UniqPtrs = make_range(ForkedSCEVs.begin(), unique(ForkedSCEVs, PtrEq));
11241124

11251125
if (size(UniqPtrs) == 1) {
1126-
// FIXME: Is this correct?
1126+
// If there are no forked pointers, there is no branch-on-poison, and hence
1127+
// drop freeze information.
11271128
UniqPtrs.begin()->setInt(false);
11281129
return UniqPtrs;
11291130
}

0 commit comments

Comments
 (0)