[llvm] [AMDGPU][True16][MC] true16 for minimummaximum/max/min/max3/min3 (PR #124184)

Joe Nash via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 27 08:31:50 PST 2025


================
@@ -7566,6 +7568,26 @@ void SIInstrInfo::moveToVALUImpl(SIInstrWorklist &Worklist,
     Inst.eraseFromParent();
     return;
   }
+  case AMDGPU::S_MINIMUM_F16:
+  case AMDGPU::S_MAXIMUM_F16: {
+    const DebugLoc &DL = Inst.getDebugLoc();
+    Register NewDst = MRI.createVirtualRegister(ST.useRealTrue16Insts()
----------------
Sisyph wrote:

Nit: As Matt suggested, you could do something like 
Register NewDst = MRI.createVirtualRegister(MRI->getNamedOperand(NewOpcode, AMDGPU::vdst).getRegClass())). However, we still can't combine the 16 and 32 bit switch cases due to the opsel0 operand.

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


More information about the llvm-commits mailing list