[llvm] [SPARC] Fix-forward #154950 by returning true if SP::V8BAR if handled (PR #162424)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 7 22:04:36 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-sparc
Author: Thurston Dang (thurstond)
<details>
<summary>Changes</summary>
Buildbot report: https://lab.llvm.org/buildbot/#/builders/24/builds/13433
Use-after-poison happens because after SP::V8BAR is handled, it erases MI, which should thereafter not be inspected by ExpandPostRA::run.
---
Full diff: https://github.com/llvm/llvm-project/pull/162424.diff
1 Files Affected:
- (modified) llvm/lib/Target/Sparc/SparcInstrInfo.cpp (+1)
``````````diff
diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.cpp b/llvm/lib/Target/Sparc/SparcInstrInfo.cpp
index c0cd0176efa30..f66eb9dbee2dc 100644
--- a/llvm/lib/Target/Sparc/SparcInstrInfo.cpp
+++ b/llvm/lib/Target/Sparc/SparcInstrInfo.cpp
@@ -668,6 +668,7 @@ bool SparcInstrInfo::expandPostRAPseudo(MachineInstr &MI) const {
.addImm(-1);
MIBundleBuilder(MBB, InstSTBAR, InstLDSTUB);
MBB.erase(MI);
+ return true;
}
}
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/162424
More information about the llvm-commits
mailing list