[llvm] [AMDGPU] Filter candidates of LiveRegOptimizer for profitable cases (PR #124624)
Jeffrey Byrnes via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 14 15:57:31 PST 2025
================
@@ -54,19 +50,31 @@ define amdgpu_kernel void @v4i8_liveout(ptr addrspace(1) %src1, ptr addrspace(1)
; GFX906: ; %bb.0: ; %entry
; GFX906-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x24
; GFX906-NEXT: s_load_dwordx2 s[6:7], s[4:5], 0x34
-; GFX906-NEXT: v_lshlrev_b32_e32 v3, 2, v0
+; GFX906-NEXT: v_lshlrev_b32_e32 v6, 2, v0
; GFX906-NEXT: v_mov_b32_e32 v1, 0
; GFX906-NEXT: v_cmp_gt_u32_e32 vcc, 15, v0
; GFX906-NEXT: s_waitcnt lgkmcnt(0)
-; GFX906-NEXT: global_load_dword v2, v3, s[0:1]
+; GFX906-NEXT: global_load_dword v2, v6, s[0:1]
+; GFX906-NEXT: s_waitcnt vmcnt(0)
+; GFX906-NEXT: v_lshrrev_b32_e32 v3, 24, v2
+; GFX906-NEXT: v_lshrrev_b32_e32 v4, 16, v2
+; GFX906-NEXT: v_lshrrev_b32_e32 v5, 8, v2
; GFX906-NEXT: s_and_saveexec_b64 s[0:1], vcc
; GFX906-NEXT: s_cbranch_execz .LBB1_2
; GFX906-NEXT: ; %bb.1: ; %bb.1
-; GFX906-NEXT: global_load_dword v2, v3, s[2:3]
+; GFX906-NEXT: global_load_dword v2, v6, s[2:3]
+; GFX906-NEXT: s_waitcnt vmcnt(0)
+; GFX906-NEXT: v_lshrrev_b32_e32 v3, 24, v2
+; GFX906-NEXT: v_lshrrev_b32_e32 v4, 16, v2
+; GFX906-NEXT: v_lshrrev_b32_e32 v5, 8, v2
; GFX906-NEXT: .LBB1_2: ; %bb.2
; GFX906-NEXT: s_or_b64 exec, exec, s[0:1]
-; GFX906-NEXT: s_waitcnt vmcnt(0)
-; GFX906-NEXT: global_store_dword v1, v2, s[6:7]
+; GFX906-NEXT: v_lshlrev_b16_e32 v0, 8, v5
----------------
jrbyrnes wrote:
The LRO should coerce this.
https://github.com/llvm/llvm-project/pull/124624
More information about the llvm-commits
mailing list