brintos

brintos / llvm-project-archived public Read only

0
0
Text · 754 B · 04fcf5f Raw
30 lines · plain
1; RUN: llc -mtriple=r600 -mcpu=redwood %s -o - | FileCheck %s2 3; This tests for a bug where vertex fetch clauses right before an ENDIF4; instruction where being emitted after the ENDIF.  We were using ALU_POP_AFTER5; for the ALU clause before the vetex fetch instead of emitting a POP instruction6; after the fetch clause.7 8 9; CHECK-LABEL: {{^}}test:10; CHECK-NOT: ALU_POP_AFTER11; CHECK: TEX12; CHECK-NEXT: POP13define amdgpu_kernel void @test(ptr addrspace(1) %out, ptr addrspace(1) %in, i32 %cond) {14entry:15  %0 = icmp eq i32 %cond, 016  br i1 %0, label %endif, label %if17 18if:19  %1 = load i32, ptr addrspace(1) %in20  br label %endif21 22endif:23  %x = phi i32 [ %1, %if], [ 0, %entry]24  store i32 %x, ptr addrspace(1) %out25  br label %done26 27done:28  ret void29}30