[llvm] [SimplifyCFG] Only consider provenance capture in store speculation (PR #138548)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed May 28 01:55:28 PDT 2025
================
@@ -3057,7 +3057,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)) &&
----------------
nikic wrote:
Updated in https://github.com/llvm/llvm-project/pull/141731.
https://github.com/llvm/llvm-project/pull/138548
More information about the llvm-commits
mailing list