[llvm-branch-commits] [llvm] [AMDGPU] Create V_FMAAK_F16/V_FMAMK_F16 in true16 with imm folding (PR #173317)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jan 14 09:00:52 PST 2026
================
@@ -3880,6 +3878,19 @@ bool SIInstrInfo::foldImmediate(MachineInstr &UseMI, MachineInstr &DefMI,
// These come before src2.
removeModOperands(UseMI);
UseMI.setDesc(get(NewOpc));
+
+ if (NewOpc == AMDGPU::V_FMAAK_F16_t16 ||
+ NewOpc == AMDGPU::V_FMAAK_F16_fake16) {
+ auto Tmp = MRI->createVirtualRegister(
+ NewOpc == AMDGPU::V_FMAAK_F16_t16 ? &AMDGPU::VGPR_16_Lo128RegClass
+ : &AMDGPU::VGPR_32_Lo128RegClass);
----------------
arsenm wrote:
Avoid hardcoding the class like above
https://github.com/llvm/llvm-project/pull/173317
More information about the llvm-branch-commits
mailing list