[llvm] [AMDGPU] Use `v_cvt_pk_*` instructions for i16_f32 saturated conversions (PR #202680)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 11 08:15:35 PDT 2026
================
@@ -3139,3 +3139,49 @@ defm V_DOT8_U32_U4 : VOP3P_Real_gfx10_gfx11_gfx12_gfx13<0x19>;
defm V_DOT4_I32_I8 : VOP3P_Real_gfx10 <0x16>;
defm V_DOT8_I32_I4 : VOP3P_Real_gfx10 <0x18>;
+
+//===----------------------------------------------------------------------===//
+// GFX11+ Patterns
+//===----------------------------------------------------------------------===//
+
+// Packed f32 -> i16 saturated conversion.
+multiclass CvtPkF32ToI16Pat<SDPatternOperator dagOp, Instruction inst> {
----------------
jayfoad wrote:
I don't quite understand what cases the 3 defs in this multiclass are supposed to handle. Is this strategy copied from somewhere else?
https://github.com/llvm/llvm-project/pull/202680
More information about the llvm-commits
mailing list