[llvm] [AMDGPU] Implement codegen for GFX11+ V_CVT_PK_[IU]16_F32 (PR #168719)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 20 11:25:10 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 &&
+ Op.getOperand(0).getValueType() == MVT::f32) {
+ // Make f32->i16 legal so we can select V_CVT_PK_[IU]16_F32.
+ return Op;
+ }
----------------
arsenm wrote:
Why not sink this into LowerFP_TO_INT?
https://github.com/llvm/llvm-project/pull/168719
More information about the llvm-commits
mailing list