1 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -O3 -relocation-model=pic -arm-atomic-cfg-tidy=0 | FileCheck %s
3 ; Tail merging must not split an IT block.
5 %struct.FILE = type { ptr, i32, i32, i16, i16, %struct.__sbuf, i32, ptr, ptr, ptr, ptr, ptr, %struct.__sbuf, ptr, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 }
6 %struct._RuneCharClass = type { [14 x i8], i32 }
7 %struct._RuneEntry = type { i32, i32, i32, ptr }
8 %struct._RuneLocale = type { [8 x i8], [32 x i8], ptr, ptr, i32, [256 x i32], [256 x i32], [256 x i32], %struct._RuneRange, %struct._RuneRange, %struct._RuneRange, ptr, i32, i32, ptr }
9 %struct._RuneRange = type { i32, ptr }
10 %struct.__sFILEX = type opaque
11 %struct.__sbuf = type { ptr, i32 }
13 @finput = external global ptr ; <ptr> [#uses=1]
14 @_DefaultRuneLocale = external global %struct._RuneLocale ; <ptr> [#uses=0]
15 @token_buffer = external global [1025 x i8], align 4 ; <ptr> [#uses=1]
16 @.str73 = external constant [6 x i8], align 4 ; <ptr> [#uses=0]
17 @.str174 = external constant [5 x i8], align 4 ; <ptr> [#uses=0]
18 @.str275 = external constant [6 x i8], align 4 ; <ptr> [#uses=0]
19 @.str376 = external constant [5 x i8], align 4 ; <ptr> [#uses=0]
20 @.str477 = external constant [6 x i8], align 4 ; <ptr> [#uses=0]
21 @.str578 = external constant [6 x i8], align 4 ; <ptr> [#uses=0]
22 @.str679 = external constant [7 x i8], align 4 ; <ptr> [#uses=0]
23 @.str780 = external constant [6 x i8], align 4 ; <ptr> [#uses=0]
24 @.str881 = external constant [5 x i8], align 4 ; <ptr> [#uses=0]
25 @.str982 = external constant [6 x i8], align 4 ; <ptr> [#uses=0]
26 @.str1083 = external constant [9 x i8], align 4 ; <ptr> [#uses=0]
27 @.str1184 = external constant [7 x i8], align 4 ; <ptr> [#uses=0]
28 @.str1285 = external constant [16 x i8], align 4 ; <ptr> [#uses=0]
29 @.str1386 = external constant [12 x i8], align 4 ; <ptr> [#uses=0]
30 @.str1487 = external constant [5 x i8], align 4 ; <ptr> [#uses=0]
31 @llvm.used = external global [1 x ptr] ; <ptr> [#uses=0]
33 define fastcc i32 @parse_percent_token() nounwind {
42 ; Do not convert into single stream code. BranchProbability Analysis assumes
43 ; that branches which goes to "ret" instruction have lower probabilities.
44 switch i32 undef, label %bb7 [
73 br i1 undef, label %bb.i.i, label %bb1.i.i
75 bb.i.i: ; preds = %bb7
76 br i1 undef, label %bb43, label %bb12
78 bb1.i.i: ; preds = %bb7
81 bb9: ; preds = %bb.i.i2
82 br i1 undef, label %bb10, label %bb11
87 bb11: ; preds = %bb10, %bb9
88 %p.0 = phi ptr [ undef, %bb10 ], [ %p.1, %bb9 ] ; <ptr> [#uses=1]
89 %0 = load ptr, ptr @finput, align 4 ; <ptr> [#uses=1]
90 %1 = tail call i32 @getc(ptr %0) nounwind ; <i32> [#uses=0]
93 bb12: ; preds = %bb11, %bb.i.i
94 %p.1 = phi ptr [ %p.0, %bb11 ], [ @token_buffer, %bb.i.i ] ; <ptr> [#uses=2]
95 %2 = icmp ult i32 undef, 128 ; <i1> [#uses=1]
96 br i1 %2, label %bb.i.i2, label %bb1.i.i3
98 bb.i.i2: ; preds = %bb12
99 %3 = load i32, ptr null, align 4 ; <i32> [#uses=1]
100 %4 = lshr i32 %3, 8 ; <i32> [#uses=1]
101 %.lobit.i1 = and i32 %4, 1 ; <i32> [#uses=1]
102 %.not = icmp ne i32 %.lobit.i1, 0 ; <i1> [#uses=1]
103 %or.cond = or i1 %.not, undef ; <i1> [#uses=1]
104 br i1 %or.cond, label %bb9, label %bb14
106 bb1.i.i3: ; preds = %bb12
109 bb14: ; preds = %bb.i.i2
110 store i8 0, ptr %p.1, align 1
111 br i1 undef, label %bb43, label %bb15
113 bb15: ; preds = %bb14
116 bb43: ; preds = %bb14, %bb.i.i, %entry
117 %.0 = phi i32 [ 7, %entry ], [ 24, %bb.i.i ], [ 9, %bb14 ] ; <i32> [#uses=1]
121 declare i32 @getc(ptr nocapture) nounwind
123 declare i32 @strcmp(ptr nocapture, ptr nocapture) nounwind readonly
125 declare i32 @__maskrune(i32, i32)
127 declare i32 @ungetc(i32, ptr nocapture) nounwind