[llvm] [AMDGPU] Use `v_cvt_pk_*` instructions for i16_f32 saturated conversions (PR #202680)

Igor Wodiany via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 03:19:31 PDT 2026


================
@@ -724,6 +724,21 @@ def S_MAX_U32 : SOP2_32 <"s_max_u32",
 } // End isCommutable = 1
 } // End Defs = [SCC]
 
+// f32 -> i16 saturated conversions. Required because those conversions
----------------
IgWod wrote:

I can confirm that scalar conversions saturate (as expected). Do you have any more comments or are you happy for this change to go in?

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


More information about the llvm-commits mailing list