[llvm] 82081a4 - PowerPC: Use use_instructions in TLSDynamicCall user collection (#219409)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 28 05:57:45 PDT 2026
Author: Matt Arsenault
Date: 2026-08-28T14:57:41+02:00
New Revision: 82081a4254e1c9072c98c0587812d4e4766d8452
URL: https://github.com/llvm/llvm-project/commit/82081a4254e1c9072c98c0587812d4e4766d8452
DIFF: https://github.com/llvm/llvm-project/commit/82081a4254e1c9072c98c0587812d4e4766d8452.diff
LOG: PowerPC: Use use_instructions in TLSDynamicCall user collection (#219409)
The loop only collects the using instructions, so iterate
use_instructions() instead of the operands to get their parents.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
Added:
Modified:
llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp b/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
index b1bccd57244da..739ef7e2e5ac5 100644
--- a/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp
@@ -180,8 +180,8 @@ namespace {
if (!RegInfo.use_empty(OutReg)) {
std::set<MachineInstr *> Uses;
// Collect all instructions that use the OutReg.
- for (MachineOperand &MO : RegInfo.use_operands(OutReg))
- Uses.insert(MO.getParent());
+ for (MachineInstr &UseMI : RegInfo.use_instructions(OutReg))
+ Uses.insert(&UseMI);
// Find the first user (e.g.: lwax/stfdx) of the OutReg within the
// current BB.
MachineBasicBlock::iterator UseIter = MBB.begin();
More information about the llvm-commits
mailing list