1 ; RUN: llc -march=r600 -mcpu=redwood %s -o - | FileCheck %s
3 ; This tests for a bug where vertex fetch clauses right before an ENDIF
4 ; instruction where being emitted after the ENDIF. We were using ALU_POP_AFTER
5 ; for the ALU clause before the vetex fetch instead of emitting a POP instruction
6 ; after the fetch clause.
9 ; CHECK-LABEL: {{^}}test:
10 ; CHECK-NOT: ALU_POP_AFTER
13 define amdgpu_kernel void @test(i32 addrspace(1)* %out, i32 addrspace(1)* %in, i32 %cond) {
15 %0 = icmp eq i32 %cond, 0
16 br i1 %0, label %endif, label %if
19 %1 = load i32, i32 addrspace(1)* %in
23 %x = phi i32 [ %1, %if], [ 0, %entry]
24 store i32 %x, i32 addrspace(1)* %out