[llvm-branch-commits] [llvm] [AMDGPU][SIInstrInfo] Materialise t16 PHI subreg operands (PR #222155)

Zach Goldthorpe via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Oct 30 10:53:39 PDT 2026


================
@@ -8186,10 +8202,15 @@ void SIInstrInfo::legalizeOperandsVALUt16(MachineInstr &MI, unsigned OpIdx,
       RI.getSubRegisterClass(CurrRC, Op.getSubReg());
   if (RI.getMatchingSuperRegClass(ExpectedRC, CurrSRC, AMDGPU::lo16)) {
     const DebugLoc &DL = MI.getDebugLoc();
+    MachineBasicBlock::iterator I = MI;
+    if (MI.isPHI()) {
----------------
zGoldthorpe wrote:

This is necessary to define where the emitted `REG_SEQUENCE` instructions go. I could make it a separate change earlier in the stack, but I don't think it would do anything on its own.

https://github.com/llvm/llvm-project/pull/222155


More information about the llvm-branch-commits mailing list