1 ; RUN: opt -loop-unroll -unroll-threshold=2000 -S < %s | llc -march=r600 -mcpu=cypress | FileCheck %s
4 ; CHECK: {{^}}alu_limits:
7 %struct.foo = type {i32, i32, i32}
9 define amdgpu_kernel void @alu_limits(i32 addrspace(1)* %out, %struct.foo addrspace(5)* %in, i32 %offset) {
11 %ptr = getelementptr inbounds %struct.foo, %struct.foo addrspace(5)* %in, i32 1, i32 2
12 %x = load i32, i32 addrspace(5)*%ptr, align 4
15 %i = phi i32 [ 100, %entry ], [ %nexti, %loop ]
16 %val = phi i32 [ 1, %entry ], [ %nextval, %loop ]
18 %nexti = sub i32 %i, 1
21 %nextval = mul i32 %val, %y
23 %cond = icmp ne i32 %nexti, 0
24 br i1 %cond, label %loop, label %end
26 %out_val = add i32 %nextval, 4
27 store i32 %out_val, i32 addrspace(1)* %out, align 4