2 ; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
3 ; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
6 @a = internal addrspace(2) constant [1 x i8] [ i8 7 ], align 1
10 ; SI: BUFFER_STORE_BYTE
12 define void @test_i8( i32 %s, i8 addrspace(1)* %out) #3 {
13 %arrayidx = getelementptr inbounds [1 x i8] addrspace(2)* @a, i32 0, i32 %s
14 %1 = load i8 addrspace(2)* %arrayidx, align 1
15 store i8 %1, i8 addrspace(1)* %out
19 @b = internal addrspace(2) constant [1 x i16] [ i16 7 ], align 2
21 ; FUNC-LABEL: @test_i16
23 ; SI: BUFFER_STORE_SHORT
25 define void @test_i16( i32 %s, i16 addrspace(1)* %out) #3 {
26 %arrayidx = getelementptr inbounds [1 x i16] addrspace(2)* @b, i32 0, i32 %s
27 %1 = load i16 addrspace(2)* %arrayidx, align 2
28 store i16 %1, i16 addrspace(1)* %out