[llvm] 3654cb7 - [AMDGPU] Use an explicit S_MOV with V_MIN in FPToSSatI16Pat pattern (#206053)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 26 06:37:46 PDT 2026


Author: Igor Wodiany
Date: 2026-06-26T14:37:42+01:00
New Revision: 3654cb7d298a17ab9683d849e70bf47601637eef

URL: https://github.com/llvm/llvm-project/commit/3654cb7d298a17ab9683d849e70bf47601637eef
DIFF: https://github.com/llvm/llvm-project/commit/3654cb7d298a17ab9683d849e70bf47601637eef.diff

LOG: [AMDGPU] Use an explicit S_MOV with V_MIN in FPToSSatI16Pat pattern (#206053)

This fixes the case where GFX7 fails expensive checks/machine
verification with GISel due to passing a literal directly to V_MIN that
is not supported on the architecture. This fixes the buildbot failure:
https://lab.llvm.org/buildbot/#/builders/187/builds/21241 caused by
#202680.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/VOP3PInstructions.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/VOP3PInstructions.td b/llvm/lib/Target/AMDGPU/VOP3PInstructions.td
index f9baed0867914..f99367d198f26 100644
--- a/llvm/lib/Target/AMDGPU/VOP3PInstructions.td
+++ b/llvm/lib/Target/AMDGPU/VOP3PInstructions.td
@@ -3275,7 +3275,7 @@ multiclass FPToSSatI16Pat<dag lhs, int hi, int lo> {
 }
 multiclass FPToUSatI16Pat<dag lhs, int hi> {
   defm : FPToIntSatI16Pat<lhs,
-      (V_MIN_U32_e64 (V_CVT_U32_F32_e64 $src0_modifiers, $src0), (i32 hi))>;
+      (V_MIN_U32_e64 (V_CVT_U32_F32_e64 $src0_modifiers, $src0), (S_MOV_B32 (i32 hi)))>;
 }
 
 let SubtargetPredicate = isGFX11Plus in {


        


More information about the llvm-commits mailing list