Home | History | Annotate | Download | only in R600
      1 ; 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 
      6 ; CHECK-LABEL: @test
      7 ; CHECK: .long   166120
      8 ; CHECK-NEXT: .long   1
      9 @lds = internal unnamed_addr addrspace(3) global i32 zeroinitializer, align 4
     10 
     11 define void @test(i32 addrspace(1)* %out, i32 %cond) {
     12 entry:
     13   %0 = icmp eq i32 %cond, 0
     14   br i1 %0, label %if, label %else
     15 
     16 if:
     17   store i32 1, i32 addrspace(3)* @lds
     18   br label %endif
     19 
     20 else:
     21   store i32 2, i32 addrspace(3)* @lds
     22   br label %endif
     23 
     24 endif:
     25   ret void
     26 }
     27