comparison test/CodeGen/AMDGPU/vtx-fetch-branch.ll @ 95:afa8332a0e37 LLVM3.8

LLVM 3.8
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 13 Oct 2015 17:48:58 +0900
parents
children 803732b1fca8
comparison
equal deleted inserted replaced
84:f3e34b893a5f 95:afa8332a0e37
1 ; RUN: llc -march=r600 -mcpu=redwood %s -o - | FileCheck %s
2
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.
7
8
9 ; CHECK-LABEL: {{^}}test:
10 ; CHECK-NOT: ALU_POP_AFTER
11 ; CHECK: TEX
12 ; CHECK-NEXT: POP
13 define void @test(i32 addrspace(1)* %out, i32 addrspace(1)* %in, i32 %cond) {
14 entry:
15 %0 = icmp eq i32 %cond, 0
16 br i1 %0, label %endif, label %if
17
18 if:
19 %1 = load i32, i32 addrspace(1)* %in
20 br label %endif
21
22 endif:
23 %x = phi i32 [ %1, %if], [ 0, %entry]
24 store i32 %x, i32 addrspace(1)* %out
25 br label %done
26
27 done:
28 ret void
29 }