1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 < %s | FileCheck -check-prefix=GCN %s
3;
4; Make sure shaders with uniform, unmodified global address space
5; loads are accessed with scalar loads.
6
7define amdgpu_ps i32 @ps_load_uniform_global_i32_align4(i32 addrspace(1)* inreg %ptr) {
8; GCN-LABEL: ps_load_uniform_global_i32_align4:
9; GCN:       ; %bb.0:
10; GCN-NEXT:    s_load_dword s0, s[2:3], 0x0
11; GCN-NEXT:    s_waitcnt lgkmcnt(0)
12; GCN-NEXT:    ; return to shader part epilog
13  %load = load i32, i32 addrspace(1)* %ptr, align 4
14  ret i32 %load
15}
16
17define amdgpu_cs i32 @cs_load_uniform_global_i32_align4(i32 addrspace(1)* inreg %ptr) {
18; GCN-LABEL: cs_load_uniform_global_i32_align4:
19; GCN:       ; %bb.0:
20; GCN-NEXT:    s_load_dword s0, s[2:3], 0x0
21; GCN-NEXT:    s_waitcnt lgkmcnt(0)
22; GCN-NEXT:    ; return to shader part epilog
23  %load = load i32, i32 addrspace(1)* %ptr, align 4
24  ret i32 %load
25}
26