[llvm] [JumpThreading][GVN] Copy metadata when inserting preload into preds (PR #134403)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 23 02:28:10 PDT 2025
================
@@ -1362,11 +1362,14 @@ bool JumpThreadingPass::simplifyPartiallyRedundantLoad(LoadInst *LoadI) {
// farther than to a predecessor, we need to reuse the code from GVN's PRE.
// It requires domination tree analysis, so for this simple case it is an
// overkill.
+ bool TransfersExecution = false;
if (PredsScanned.size() != AvailablePreds.size() &&
- !isSafeToSpeculativelyExecute(LoadI))
+ !isSafeToSpeculativelyExecute(LoadI)) {
for (auto I = LoadBB->begin(); &*I != LoadI; ++I)
if (!isGuaranteedToTransferExecutionToSuccessor(&*I))
return false;
+ TransfersExecution = true;
----------------
dtcxzyw wrote:
Fixed.
https://github.com/llvm/llvm-project/pull/134403
More information about the llvm-commits
mailing list