aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index d94abea..7840601 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -3067,7 +3067,9 @@ static Value *isSafeToSpeculateStore(Instruction *I, BasicBlock *BrBB,
Value *Obj = getUnderlyingObject(StorePtr);
bool ExplicitlyDereferenceableOnly;
if (isWritableObject(Obj, ExplicitlyDereferenceableOnly) &&
- !PointerMayBeCaptured(Obj, /*ReturnCaptures=*/false) &&
+ capturesNothing(
+ PointerMayBeCaptured(Obj, /*ReturnCaptures=*/false,
+ CaptureComponents::Provenance)) &&
(!ExplicitlyDereferenceableOnly ||
isDereferenceablePointer(StorePtr, StoreTy,
LI->getDataLayout()))) {