[llvm] [AArch64] Fix stp kill when merging forward. (PR #152994)
Ricardo Jesus via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 11 10:22:37 PDT 2025
================
@@ -1193,7 +1193,8 @@ AArch64LoadStoreOpt::mergePairedInsns(MachineBasicBlock::iterator I,
// USE kill %w1 ; need to clear kill flag when moving STRWui downwards
// STRW %w0
Register Reg = getLdStRegOp(*I).getReg();
- for (MachineInstr &MI : make_range(std::next(I), Paired))
+ for (MachineInstr &MI :
----------------
rj-jesus wrote:
I think the kill flags of `I` should be preserved here as they are used to [track defined registers](https://github.com/llvm/llvm-project/blob/d2b3e86321eaf954451e0a49534fa654dd67421e/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp#L1385).
https://github.com/llvm/llvm-project/pull/152994
More information about the llvm-commits
mailing list