2017-08-08 02:30:35 +08:00
|
|
|
; RUN: llc -O0 -verify-machineinstrs -march=amdgcn -mcpu=tahiti < %s | FileCheck %s
|
2015-01-28 01:27:15 +08:00
|
|
|
; RUN: llc -O0 -verify-machineinstrs -march=amdgcn -mcpu=tonga < %s | FileCheck %s
|
2014-03-02 05:45:41 +08:00
|
|
|
|
2014-10-02 01:15:17 +08:00
|
|
|
; CHECK-LABEL: {{^}}test_loop:
|
2017-03-22 05:39:51 +08:00
|
|
|
define amdgpu_kernel void @test_loop(i32 addrspace(1)* noalias %out, i32 addrspace(1)* noalias %in, i32 %val) nounwind {
|
2014-03-02 05:45:41 +08:00
|
|
|
entry:
|
|
|
|
br label %loop.body
|
|
|
|
|
|
|
|
loop.body:
|
|
|
|
%i = phi i32 [0, %entry], [%i.inc, %loop.body]
|
|
|
|
store i32 222, i32 addrspace(1)* %out
|
|
|
|
%cmp = icmp ne i32 %i, %val
|
|
|
|
%i.inc = add i32 %i, 1
|
|
|
|
br i1 %cmp, label %loop.body, label %end
|
|
|
|
|
|
|
|
end:
|
|
|
|
ret void
|
|
|
|
}
|