[PATCH] D126041: [RegisterCoalescer] fix subregister index in remat call
Afanasyev Ivan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 19 22:17:15 PDT 2022
ivafanas created this revision.
ivafanas added reviewers: qcolombet, MatzeB, kparzysz.
Herald added subscribers: tpr, arphaman, hiraditya.
Herald added a project: All.
ivafanas requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
`TII->reMaterialize` accepts sub register index which denotes dst reg substituion. `DstIdx` should be passed instead of `SrcIdx`, because `SrcIdx` relates to another register.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D126041
Files:
llvm/lib/CodeGen/RegisterCoalescer.cpp
Index: llvm/lib/CodeGen/RegisterCoalescer.cpp
===================================================================
--- llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -1359,7 +1359,7 @@
MachineBasicBlock *MBB = CopyMI->getParent();
MachineBasicBlock::iterator MII =
std::next(MachineBasicBlock::iterator(CopyMI));
- TII->reMaterialize(*MBB, MII, DstReg, SrcIdx, *DefMI, *TRI);
+ TII->reMaterialize(*MBB, MII, DstReg, DstIdx, *DefMI, *TRI);
MachineInstr &NewMI = *std::prev(MII);
NewMI.setDebugLoc(DL);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126041.430881.patch
Type: text/x-patch
Size: 559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220520/d6951e12/attachment.bin>
More information about the llvm-commits
mailing list