1 ; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
3 ; This test checks that uses and defs of the AR register happen in the same
6 ; CHECK: @mova_same_clause
8 ; CHECK-NOT: ALU clause
11 ; CHECK-NOT: ALU clause
14 define void @mova_same_clause(i32 addrspace(1)* nocapture %out, i32 addrspace(1)* nocapture %in) {
16 %stack = alloca [5 x i32], align 4
17 %0 = load i32 addrspace(1)* %in, align 4
18 %arrayidx1 = getelementptr inbounds [5 x i32]* %stack, i32 0, i32 %0
19 store i32 4, i32* %arrayidx1, align 4
20 %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %in, i32 1
21 %1 = load i32 addrspace(1)* %arrayidx2, align 4
22 %arrayidx3 = getelementptr inbounds [5 x i32]* %stack, i32 0, i32 %1
23 store i32 5, i32* %arrayidx3, align 4
24 %arrayidx10 = getelementptr inbounds [5 x i32]* %stack, i32 0, i32 0
25 %2 = load i32* %arrayidx10, align 4
26 store i32 %2, i32 addrspace(1)* %out, align 4
27 %arrayidx12 = getelementptr inbounds [5 x i32]* %stack, i32 0, i32 1
28 %3 = load i32* %arrayidx12
29 %arrayidx13 = getelementptr inbounds i32 addrspace(1)* %out, i32 1
30 store i32 %3, i32 addrspace(1)* %arrayidx13