Home | History | Annotate | Download | only in Bitcode
      1 ; RUN: llvm-as < %s | llvm-dis | FileCheck %s
      2 ; RUN: verify-uselistorder < %s
      3 ; PR9857
      4 
      5 define void @f(i8** nocapture %ptr1) {
      6 ; CHECK: define void @f
      7 entry:
      8   br label %here.i
      9 
     10 here.i:
     11   store i8* blockaddress(@doit, %here), i8** %ptr1, align 8
     12 ; CHECK: blockaddress(@doit, %here)
     13   br label %doit.exit
     14 
     15 doit.exit:
     16   ret void
     17 }
     18 
     19 define void @doit(i8** nocapture %pptr) {
     20 ; CHECK: define void @doit
     21 entry:
     22   br label %here
     23 
     24 here:
     25   store i8* blockaddress(@doit, %here), i8** %pptr, align 8
     26 ; CHECK: blockaddress(@doit, %here)
     27   br label %end
     28 
     29 end:
     30   ret void
     31 }
     32 
     33 ; PR13895
     34 define void @doitagain(i8** nocapture %pptr) {
     35 ; CHECK: define void @doitagain
     36 entry:
     37   br label %here
     38 
     39 here:
     40   store i8* blockaddress(@doit, %here), i8** %pptr, align 8
     41 ; CHECK: blockaddress(@doit, %here)
     42   br label %end
     43 
     44 end:
     45   ret void
     46 }
     47 
     48 ; Check a blockaddress taken in two separate functions before the referenced
     49 ; function.
     50 define i8* @take1() {
     51   ret i8* blockaddress(@taken, %bb)
     52 }
     53 define i8* @take2() {
     54   ret i8* blockaddress(@taken, %bb)
     55 }
     56 define void @taken() {
     57   unreachable
     58 bb:
     59   unreachable
     60 }
     61