1 ; RUN: llc -march=amdgcn -mattr=-promote-alloca -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
2 ; RUN: llc -march=amdgcn -mcpu=tonga -mattr=-promote-alloca -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
4 ; FUNC-LABEL: {{^}}load_i8_sext_private:
5 ; SI: buffer_load_sbyte v{{[0-9]+}}, off, s[{{[0-9]+:[0-9]+}}], 0 offset:4{{$}}
6 define amdgpu_kernel void @load_i8_sext_private(ptr addrspace(1) %out) {
8 %tmp0 = alloca i8, addrspace(5)
9 %tmp1 = load i8, ptr addrspace(5) %tmp0
10 %tmp2 = sext i8 %tmp1 to i32
11 store i32 %tmp2, ptr addrspace(1) %out
15 ; FUNC-LABEL: {{^}}load_i8_zext_private:
16 ; SI: buffer_load_ubyte v{{[0-9]+}}, off, s[{{[0-9]+:[0-9]+}}], 0 offset:4{{$}}
17 define amdgpu_kernel void @load_i8_zext_private(ptr addrspace(1) %out) {
19 %tmp0 = alloca i8, addrspace(5)
20 %tmp1 = load i8, ptr addrspace(5) %tmp0
21 %tmp2 = zext i8 %tmp1 to i32
22 store i32 %tmp2, ptr addrspace(1) %out
26 ; FUNC-LABEL: {{^}}load_i16_sext_private:
27 ; SI: buffer_load_sshort v{{[0-9]+}}, off, s[{{[0-9]+:[0-9]+}}], 0 offset:4{{$}}
28 define amdgpu_kernel void @load_i16_sext_private(ptr addrspace(1) %out) {
30 %tmp0 = alloca i16, addrspace(5)
31 %tmp1 = load i16, ptr addrspace(5) %tmp0
32 %tmp2 = sext i16 %tmp1 to i32
33 store i32 %tmp2, ptr addrspace(1) %out
37 ; FUNC-LABEL: {{^}}load_i16_zext_private:
38 ; SI: buffer_load_ushort v{{[0-9]+}}, off, s[{{[0-9]+:[0-9]+}}], 0 offset:4 glc{{$}}
39 define amdgpu_kernel void @load_i16_zext_private(ptr addrspace(1) %out) {
41 %tmp0 = alloca i16, addrspace(5)
42 %tmp1 = load volatile i16, ptr addrspace(5) %tmp0
43 %tmp2 = zext i16 %tmp1 to i32
44 store i32 %tmp2, ptr addrspace(1) %out