1 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=fiji -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
3 ; GCN-LABEL: {{^}}private_load_maybe_divergent:
4 ; GCN: buffer_load_dword
5 ; GCN-NOT: s_load_dword s
7 ; GCN-NOT: s_load_dword s
8 define amdgpu_kernel void @private_load_maybe_divergent(i32 addrspace(4)* %k, i32* %flat) {
9 %load = load volatile i32, i32 addrspace(5)* undef, align 4
10 %gep = getelementptr inbounds i32, i32 addrspace(4)* %k, i32 %load
11 %maybe.not.uniform.load = load i32, i32 addrspace(4)* %gep, align 4
12 store i32 %maybe.not.uniform.load, i32 addrspace(1)* undef
16 ; GCN-LABEL: {{^}}flat_load_maybe_divergent:
19 ; GCN: flat_load_dword
21 ; GCN: flat_load_dword
23 ; GCN: flat_store_dword
24 define amdgpu_kernel void @flat_load_maybe_divergent(i32 addrspace(4)* %k, i32* %flat) {
25 %load = load i32, i32* %flat, align 4
26 %gep = getelementptr inbounds i32, i32 addrspace(4)* %k, i32 %load
27 %maybe.not.uniform.load = load i32, i32 addrspace(4)* %gep, align 4
28 store i32 %maybe.not.uniform.load, i32 addrspace(1)* undef