[llvm] [AMDGPU][True16][CodeGen] legalize 16bit and 32bit use-def chain for moveToVALU in si-fix-sgpr-lowering (PR #138734)

Joe Nash via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 3 07:20:47 PDT 2025


================
@@ -7227,27 +7227,54 @@ bool SIInstrWorklist::isDeferred(MachineInstr *MI) {
   return DeferredList.contains(MI);
 }
 
-// 16bit SALU use sgpr32. If a 16bit SALU get lowered to VALU in true16 mode,
-// sgpr32 is replaced to vgpr32 which is illegal in t16 inst. Need to add
-// subreg access properly. This can be removed after we have sgpr16 in place
-void SIInstrInfo::legalizeOperandsVALUt16(MachineInstr &Inst,
+// legalize operand between 16bit and 32bit registers in v2s copy
----------------
Sisyph wrote:

```suggestion
// Legalize size mismatches between 16bit and 32bit registers in v2s copy
```

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


More information about the llvm-commits mailing list