[llvm] [AMDGPU][True16][CodeGen] support for true16 for vinterp 16bit instructions (PR #116702)
Brox Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 21 14:54:15 PST 2024
================
@@ -181,9 +181,43 @@ multiclass VInterpF16Pat <SDPatternOperator op, Instruction inst,
def : VInterpF16Pat<op, inst, dst_type, 1, high_pat>;
}
+class VInterpF16Pat_t16 <SDPatternOperator op, Instruction inst,
+ ValueType dstVT, bit high, bit isP2> : GCNPat <
+ (dstVT (op
+ (VINTERPMods f32:$src0, i32:$src0_modifiers),
+ (VINTERPMods f32:$src1, i32:$src1_modifiers),
+ (VINTERPMods f32:$src2, i32:$src2_modifiers),
+ !if(high, (i1 -1), (i1 0)))),
+ (inst $src0_modifiers,
+ (f16 (EXTRACT_SUBREG VGPR_32:$src0, !if(high, hi16, lo16))),
----------------
broxigarchen wrote:
Hi Matt. I think the input types are depending on the intrinsic. From this test https://github.com/llvm/llvm-project/pull/116702/files#diff-67c39b2811e166871c5e79f74f33221b90c06a20645efe1745e294f99cb3bec8R123 it seems we are passing a 32 bits float here as the input
https://github.com/llvm/llvm-project/pull/116702
More information about the llvm-commits
mailing list