[PATCH] D61669: [ValueTracking] Look through ptrmask intrinsics during getUnderlyingObject.
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 8 09:15:04 PDT 2019
aqjune added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:3702
+ Call->getIntrinsicID() == Intrinsic::ptrmask;
}
----------------
I found that `getArgumentAliasingToReturnedPointer` (which calls this function) is used at `isKnownNonZero` with the following pattern:
```
if (const auto *RP = getArgumentAliasingToReturnedPointer(Call))
return isKnownNonZero(RP, Depth, Q);
```
which seems to assume that the non-zeroness of the result of a function call is equivalent to the non-zeroness of the first argument. `isKnownNonZero` should be fixed, or maybe we can add a boolean flag to `isIntrinsicReturningPointerAliasingArgumentWithoutCapturing` that allows callers to determine its purpose?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61669/new/
https://reviews.llvm.org/D61669
More information about the llvm-commits
mailing list