2 ; RUN: llc < %s -march=r600 -mcpu=SI -verify-machineinstrs| FileCheck --check-prefix=SI %s
4 declare i32 @llvm.SI.tid() readnone
7 ; SI-LABEL: @test_array_ptr_calc(
8 define void @test_array_ptr_calc(i32 addrspace(1)* noalias %out, [16 x i32] addrspace(1)* noalias %inA, i32 addrspace(1)* noalias %inB) {
9 %tid = call i32 @llvm.SI.tid() readnone
10 %a_ptr = getelementptr [16 x i32] addrspace(1)* %inA, i32 1, i32 %tid
11 %b_ptr = getelementptr i32 addrspace(1)* %inB, i32 %tid
12 %a = load i32 addrspace(1)* %a_ptr
13 %b = load i32 addrspace(1)* %b_ptr
14 %result = add i32 %a, %b
15 store i32 %result, i32 addrspace(1)* %out