Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios
      2 
      3 ; This test ensures HandlePHINodesInSuccessorBlocks() is able to promote basic
      4 ; non-legal integer types (i.e., i1, i8, i16).
      5 
      6 declare void @fooi8(i8)
      7 declare void @fooi16(i16)
      8 
      9 define void @foo(i1 %cmp) nounwind ssp {
     10 entry:
     11   br i1 %cmp, label %cond.true, label %cond.false
     12 
     13 cond.true:                                        ; preds = %entry
     14   br label %cond.end
     15 
     16 cond.false:                                       ; preds = %entry
     17   br label %cond.end
     18 
     19 cond.end:                                         ; preds = %cond.false, %cond.true
     20   %cond = phi i1 [ 0, %cond.true ], [ 1, %cond.false ]
     21   br i1 %cond, label %cond.true8, label %cond.false8
     22 
     23 cond.true8:                                       ; preds = %cond.end
     24   br label %cond.end8
     25 
     26 cond.false8:                                      ; preds = %cond.end
     27   br label %cond.end8
     28 
     29 cond.end8:                                        ; preds = %cond.false8, %cond.true8
     30   %cond8 = phi i8 [ 0, %cond.true8 ], [ 1, %cond.false8 ]
     31   call void @fooi8(i8 %cond8)
     32   br i1 0, label %cond.true16, label %cond.false16
     33 
     34 cond.true16:                                       ; preds = %cond.end8
     35   br label %cond.end16
     36 
     37 cond.false16:                                      ; preds = %cond.end8
     38   br label %cond.end16
     39 
     40 cond.end16:                                        ; preds = %cond.false16, %cond.true16
     41   %cond16 = phi i16 [ 0, %cond.true16 ], [ 1, %cond.false16 ]
     42   call void @fooi16(i16 %cond16)
     43   ret void
     44 }
     45