[llvm] [GISel][CombinerHelper] Combine op(trunc(x), trunc(y)) -> trunc(op(x, y)) (PR #89023)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 07:51:24 PDT 2024
================
@@ -290,9 +288,9 @@ define amdgpu_ps i16 @s_uaddsat_v2i8(i16 inreg %lhs.arg, i16 inreg %rhs.arg) {
; GFX6-NEXT: s_min_u32 s2, s3, s2
; GFX6-NEXT: s_add_i32 s1, s1, s2
; GFX6-NEXT: s_lshr_b32 s1, s1, 24
-; GFX6-NEXT: s_lshr_b32 s0, s0, 24
-; GFX6-NEXT: s_lshl_b32 s1, s1, 8
-; GFX6-NEXT: s_or_b32 s0, s0, s1
+; GFX6-NEXT: v_mov_b32_e32 v0, s0
+; GFX6-NEXT: v_alignbit_b32 v0, s1, v0, 24
+; GFX6-NEXT: v_readfirstlane_b32 s0, v0
----------------
arsenm wrote:
This is worse, but not the fault of this patch
https://github.com/llvm/llvm-project/pull/89023
More information about the llvm-commits
mailing list