[llvm] [AMDGPU][CodeGen] Fold immediates in src1 operands of V_MAD/MAC/FMA/FMAC. (PR #68002)

Ivan Kosarev via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 5 03:18:22 PDT 2023


================
@@ -3266,18 +3269,22 @@ bool SIInstrInfo::FoldImmediate(MachineInstr &UseMI, MachineInstr &DefMI,
       if (pseudoToMCOpcode(NewOpc) == -1)
         return false;
 
-      // We need to swap operands 0 and 1 since madmk constant is at operand 1.
+      // V_FMAMK_F16_t16 takes VGPR_32_Lo128 operands, so the rewrite
----------------
kosarev wrote:

No, #66202 handles the `V_FMAAK_F16_t16` case above.

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


More information about the llvm-commits mailing list