Skip to content

Commit 9ad83f7

Browse files
committed
[LAA] Get pointer address space from AddRec (NFC).
Retrieve the address space from the pointer AddRec instead of the IR pointer value, to prepare to make the IR pointer value optional.
1 parent 0931a2a commit 9ad83f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ static bool isNoWrap(PredicatedScalarEvolution &PSE,
894894
// If the null pointer is undefined, then a access sequence which would
895895
// otherwise access it can be assumed not to unsigned wrap. Note that this
896896
// assumes the object in memory is aligned to the natural alignment.
897-
unsigned AddrSpace = Ptr->getType()->getPointerAddressSpace();
897+
unsigned AddrSpace = AR->getType()->getPointerAddressSpace();
898898
if (!NullPointerIsDefined(L->getHeader()->getParent(), AddrSpace) &&
899899
(Stride == 1 || Stride == -1))
900900
return true;

0 commit comments

Comments
 (0)