[llvm] [AMDGPU] Implement codegen for GFX11+ V_CVT_PK_[IU]16_F32 (PR #168719)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 21 03:58:02 PST 2025


================
@@ -6806,6 +6806,11 @@ SDValue SITargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) const {
     return splitTernaryVectorOp(Op, DAG);
   case ISD::FP_TO_SINT:
   case ISD::FP_TO_UINT:
+    if (AMDGPU::isGFX11Plus(*Subtarget) && Op.getValueType() == MVT::i16 &&
----------------
jayfoad wrote:

I'm not sure there's a better way to check for V_CVT_PK_[IU]16_F32 unless I add a new predicate specifically for those instructions.

Alternatively I could make this case legal for all subtargets. I'm not sure if that's better (for consistency) or worse (because there's really no reason for it to be legal on a subtarget that does not support V_CVT_PK_[IU]16_F32).

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


More information about the llvm-commits mailing list