diff options
author | Florian Hahn <flo@fhahn.com> | 2019-08-15 18:39:56 +0000 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2019-08-15 18:39:56 +0000 |
commit | 3f2850bc606c847075673554fe49d4a35f525b61 (patch) | |
tree | 8798feee2aad09532bb36c305867aed4321ebdff /llvm/lib/Analysis/ValueTracking.cpp | |
parent | ce1750d9642551bfe288980eaa135c19826bd05b (diff) | |
download | bcm5719-llvm-3f2850bc606c847075673554fe49d4a35f525b61.tar.gz bcm5719-llvm-3f2850bc606c847075673554fe49d4a35f525b61.zip |
[ValueTracking] Look through ptrmask intrinsics during getUnderlyingObject.
Reviewers: nlopes, efriedma, hfinkel, sanjoy, aqjune, jdoerfert
Reviewed By: jdoerfert
Subscribers: jdoerfert, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61669
llvm-svn: 369036
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 74c813ff70b..74293dbc973 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -3677,7 +3677,9 @@ bool llvm::isIntrinsicReturningPointerAliasingArgumentWithoutCapturing( return Call->getIntrinsicID() == Intrinsic::launder_invariant_group || Call->getIntrinsicID() == Intrinsic::strip_invariant_group || Call->getIntrinsicID() == Intrinsic::aarch64_irg || - Call->getIntrinsicID() == Intrinsic::aarch64_tagp; + Call->getIntrinsicID() == Intrinsic::aarch64_tagp || + (!MustPreserveNullness && + Call->getIntrinsicID() == Intrinsic::ptrmask); } /// \p PN defines a loop-variant pointer to an object. Check if the @@ -3735,7 +3737,7 @@ Value *llvm::GetUnderlyingObject(Value *V, const DataLayout &DL, // because it should be in sync with CaptureTracking. Not using it may // cause weird miscompilations where 2 aliasing pointers are assumed to // noalias. - if (auto *RP = getArgumentAliasingToReturnedPointer(Call, true)) { + if (auto *RP = getArgumentAliasingToReturnedPointer(Call, false)) { V = RP; continue; } |