[llvm-branch-commits] [llvm] [AMDGPU] Form VOPD3 pairs with pair-local literal moves (PR #223431)
Zach Goldthorpe via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Sep 16 11:10:09 PDT 2026
================
@@ -123,35 +306,30 @@ class GCNCreateVOPD {
const SIInstrInfo *SII = ST->getInstrInfo();
bool Changed = false;
- SmallVector<VOPDMatchInfo> ReplaceCandidates;
-
- for (auto &MBB : MF) {
+ for (MachineBasicBlock &MBB : MF) {
+ SmallVector<VOPDCandidate, 8> Candidates;
auto MII = MBB.begin(), E = MBB.end();
while (MII != E) {
- auto *FirstMI = &*MII;
+ MachineInstr *FirstMI = &*MII;
MII = next_nodbg(MII, MBB.end());
if (MII == MBB.end())
break;
if (FirstMI->isDebugInstr())
continue;
- auto *SecondMI = &*MII;
+ MachineInstr *SecondMI = &*MII;
if (std::optional<VOPDMatchInfo> Match =
tryMatchVOPDPair(*SII, *FirstMI, *SecondMI))
- ReplaceCandidates.push_back(std::move(*Match));
+ Candidates.push_back({std::move(*Match), Register()});
----------------
zGoldthorpe wrote:
```suggestion
Candidates.emplace_back(std::move(*Match), Register());
```
https://github.com/llvm/llvm-project/pull/223431
More information about the llvm-branch-commits
mailing list