1; RUN: llc -O0 -verify-machineinstrs -march=amdgcn -mcpu=tahiti < %s | FileCheck %s
2; RUN: llc -O0 -verify-machineinstrs -march=amdgcn -mcpu=tonga < %s | FileCheck %s
3
4; CHECK-LABEL: {{^}}test_loop:
5define amdgpu_kernel void @test_loop(i32 addrspace(1)* noalias %out, i32 addrspace(1)* noalias %in, i32 %val) nounwind {
6entry:
7  br label %loop.body
8
9loop.body:
10  %i = phi i32 [0, %entry], [%i.inc, %loop.body]
11  store i32 222, i32 addrspace(1)* %out
12  %cmp = icmp ne i32 %i, %val
13  %i.inc = add i32 %i, 1
14  br i1 %cmp, label %loop.body, label %end
15
16end:
17  ret void
18}
19