• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs< %s | FileCheck -check-prefix=SI %s
2;
3;
4; Most SALU instructions ignore control flow, so we need to make sure
5; they don't overwrite values from other blocks.
6
7; SI-NOT: S_ADD
8
9define void @sgpr_if_else(i32 addrspace(1)* %out, i32 %a, i32 %b, i32 %c, i32 %d, i32 %e) {
10entry:
11  %0 = icmp eq i32 %a, 0
12  br i1 %0, label %if, label %else
13
14if:
15  %1 = add i32 %b, %c
16  br label %endif
17
18else:
19  %2 = add i32 %d, %e
20  br label %endif
21
22endif:
23  %3 = phi i32 [%1, %if], [%2, %else]
24  %4 = add i32 %3, %a
25  store i32 %4, i32 addrspace(1)* %out
26  ret void
27}
28