1 ; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios
3 ; This test ensures HandlePHINodesInSuccessorBlocks() is able to promote basic
4 ; non-legal integer types (i.e., i1, i8, i16).
6 declare void @fooi8(i8)
7 declare void @fooi16(i16)
9 define void @foo(i1 %cmp) nounwind ssp {
11 br i1 %cmp, label %cond.true, label %cond.false
13 cond.true: ; preds = %entry
16 cond.false: ; preds = %entry
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
23 cond.true8: ; preds = %cond.end
26 cond.false8: ; preds = %cond.end
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
34 cond.true16: ; preds = %cond.end8
37 cond.false16: ; preds = %cond.end8
40 cond.end16: ; preds = %cond.false16, %cond.true16
41 %cond16 = phi i16 [ 0, %cond.true16 ], [ 1, %cond.false16 ]
42 call void @fooi16(i16 %cond16)