blob: 5287723ce191be49ad9371737dec6de37dd0d561 [file] [log] [blame]
Tom Stellardde60e252013-09-05 18:37:57 +00001; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
2
3; This test makes sure we do not double count global values when they are
4; used in different basic blocks.
5
Tom Stellard79243d92014-10-01 17:15:17 +00006; CHECK-LABEL: {{^}}test:
Tom Stellardde60e252013-09-05 18:37:57 +00007; CHECK: .long 166120
8; CHECK-NEXT: .long 1
Matt Arsenaultcc8d3b82014-11-13 19:56:13 +00009@lds = internal unnamed_addr addrspace(3) global i32 undef, align 4
Tom Stellardde60e252013-09-05 18:37:57 +000010
11define void @test(i32 addrspace(1)* %out, i32 %cond) {
12entry:
13 %0 = icmp eq i32 %cond, 0
14 br i1 %0, label %if, label %else
15
16if:
17 store i32 1, i32 addrspace(3)* @lds
18 br label %endif
19
20else:
21 store i32 2, i32 addrspace(3)* @lds
22 br label %endif
23
24endif:
25 ret void
26}