[llvm] [AMDGPU][GFX12] Restrict scalar subword loads to PAL (PR #117576)

Juan Manuel Martinez CaamaƱo via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 08:43:03 PST 2024


================
@@ -686,13 +801,20 @@ define amdgpu_ps void @s_buffer_load_ushort_sgpr_or_imm_offset_divergent(<4 x i3
 ; DAG-NEXT:    global_store_b32 v[0:1], v2, off
 ; DAG-NEXT:    s_endpgm
 ;
-; GISEL-LABEL: s_buffer_load_ushort_sgpr_or_imm_offset_divergent:
-; GISEL:       ; %bb.0: ; %main_body
-; GISEL-NEXT:    buffer_load_b32 v2, v2, s[0:3], null offen
-; GISEL-NEXT:    s_wait_loadcnt 0x0
-; GISEL-NEXT:    v_and_b32_e32 v2, 0xffff, v2
-; GISEL-NEXT:    global_store_b32 v[0:1], v2, off
-; GISEL-NEXT:    s_endpgm
+; DEFAULT-LABEL: s_buffer_load_ushort_sgpr_or_imm_offset_divergent:
+; DEFAULT:       ; %bb.0: ; %main_body
+; DEFAULT-NEXT:    buffer_load_u16 v2, v2, s[0:3], null offen
+; DEFAULT-NEXT:    s_wait_loadcnt 0x0
+; DEFAULT-NEXT:    global_store_b32 v[0:1], v2, off
+; DEFAULT-NEXT:    s_endpgm
+;
+; PAL-GISEL-LABEL: s_buffer_load_ushort_sgpr_or_imm_offset_divergent:
+; PAL-GISEL:       ; %bb.0: ; %main_body
+; PAL-GISEL-NEXT:    buffer_load_b32 v2, v2, s[0:3], null offen
----------------
jmmartinez wrote:

These wider buffer loads disappear with https://github.com/llvm/llvm-project/pull/117574

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


More information about the llvm-commits mailing list