[llvm] [LAA] Make Ptr argument optional in isNoWrap. (PR #127410)
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 17 13:26:50 PST 2025
================
@@ -1144,13 +1153,10 @@ bool AccessAnalysis::createCheckForAccess(RuntimePointerChecking &RtCheck,
// When we run after a failing dependency check we have to make sure
// we don't have wrapping pointers.
- if (ShouldCheckWrap) {
- // Skip wrap checking when translating pointers.
- if (TranslatedPtrs.size() > 1)
- return false;
-
- if (!isNoWrap(PSE, AR, Ptr, AccessTy, TheLoop, Assume))
- return false;
+ if (ShouldCheckWrap &&
+ !isNoWrap(PSE, AR, TranslatedPtrs.size() == 1 ? Ptr : nullptr, AccessTy,
----------------
Meinersbur wrote:
A direct translation would be
```suggestion
!isNoWrap(PSE, AR, TranslatedPtrs.size() >= 1 ? Ptr : nullptr, AccessTy,
```
why *exactly* 1?
https://github.com/llvm/llvm-project/pull/127410
More information about the llvm-commits
mailing list