1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-- -disable-cgp-delete-phis | FileCheck %s
4 %struct.COMPOSITE = type { i8, i16, i16 }
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.FILE_POS = type { i8, i8, i16, i32 }
7 %struct.FIRST_UNION = type { %struct.FILE_POS }
8 %struct.FONT_INFO = type { ptr, ptr, ptr, ptr, i32, ptr, ptr, i16, i16, ptr, ptr, ptr, ptr }
9 %struct.FOURTH_UNION = type { %struct.STYLE }
10 %struct.GAP = type { i8, i8, i16 }
11 %struct.LIST = type { ptr, ptr }
12 %struct.SECOND_UNION = type { { i16, i8, i8 } }
13 %struct.STYLE = type { { %struct.GAP }, { %struct.GAP }, i16, i16, i32 }
14 %struct.THIRD_UNION = type { ptr, [8 x i8] }
15 %struct.__sFILEX = type opaque
16 %struct.__sbuf = type { ptr, i32 }
17 %struct.head_type = type { [2 x %struct.LIST], %struct.FIRST_UNION, %struct.SECOND_UNION, %struct.THIRD_UNION, %struct.FOURTH_UNION, ptr, { ptr }, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 }
18 %struct.metrics = type { i16, i16, i16, i16, i16 }
19 %struct.rec = type { %struct.head_type }
21 define void @FontChange(i1 %foo) nounwind {
22 ; CHECK-LABEL: FontChange:
23 ; CHECK: # %bb.0: # %entry
24 ; CHECK-NEXT: testb $1, %dil
25 ; CHECK-NEXT: je .LBB0_9
26 ; CHECK-NEXT: .p2align 4
27 ; CHECK-NEXT: .LBB0_1: # %bb366
28 ; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
29 ; CHECK-NEXT: testb $1, %dil
30 ; CHECK-NEXT: jne .LBB0_1
31 ; CHECK-NEXT: # %bb.2: # %bb428
32 ; CHECK-NEXT: testb $1, %dil
33 ; CHECK-NEXT: je .LBB0_9
34 ; CHECK-NEXT: .p2align 4
35 ; CHECK-NEXT: .LBB0_3: # %bb650
36 ; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
37 ; CHECK-NEXT: cmpb $0, 0
38 ; CHECK-NEXT: je .LBB0_3
39 ; CHECK-NEXT: # %bb.4: # %bb662
40 ; CHECK-NEXT: movl 0, %eax
41 ; CHECK-NEXT: movl %eax, %ecx
42 ; CHECK-NEXT: andl $57344, %ecx # imm = 0xE000
43 ; CHECK-NEXT: cmpl $8192, %ecx # imm = 0x2000
44 ; CHECK-NEXT: jne .LBB0_9
45 ; CHECK-NEXT: # %bb.5: # %bb4884
46 ; CHECK-NEXT: andl $7168, %eax # imm = 0x1C00
47 ; CHECK-NEXT: cmpl $1024, %eax # imm = 0x400
48 ; CHECK-NEXT: jne .LBB0_9
49 ; CHECK-NEXT: # %bb.6: # %bb4932
50 ; CHECK-NEXT: testb $1, %dil
51 ; CHECK-NEXT: jne .LBB0_9
52 ; CHECK-NEXT: # %bb.7: # %bb4940
53 ; CHECK-NEXT: movl 0, %eax
54 ; CHECK-NEXT: cmpl $160, %eax
55 ; CHECK-NEXT: je .LBB0_9
56 ; CHECK-NEXT: # %bb.8: # %bb4940
57 ; CHECK-NEXT: cmpl $159, %eax
58 ; CHECK-NEXT: .LBB0_9: # %bb4897
61 br i1 %foo, label %bb298, label %bb49
62 bb49: ; preds = %entry
64 bb298: ; preds = %entry
65 br i1 %foo, label %bb304, label %bb366
66 bb304: ; preds = %bb298
67 br i1 %foo, label %bb330, label %bb428
68 bb330: ; preds = %bb366, %bb304
70 bb366: ; preds = %bb330, %bb298
71 br i1 %foo, label %bb330, label %bb428
72 bb428: ; preds = %bb366, %bb304
73 br i1 %foo, label %bb650, label %bb433
74 bb433: ; preds = %bb428
76 bb650: ; preds = %bb650, %bb428
77 %tmp658 = load i8, ptr null, align 8 ; <i8> [#uses=1]
78 %tmp659 = icmp eq i8 %tmp658, 0 ; <i1> [#uses=1]
79 br i1 %tmp659, label %bb650, label %bb662
80 bb662: ; preds = %bb650
82 bb688: ; preds = %bb662
84 bb761: ; preds = %bb662
85 %tmp487248736542 = load i32, ptr null, align 4 ; <i32> [#uses=2]
86 %tmp487648776541 = and i32 %tmp487248736542, 57344 ; <i32> [#uses=1]
87 %tmp4881 = icmp eq i32 %tmp487648776541, 8192 ; <i1> [#uses=1]
88 br i1 %tmp4881, label %bb4884, label %bb4897
89 bb4884: ; preds = %bb761
90 %tmp488948906540 = and i32 %tmp487248736542, 7168 ; <i32> [#uses=1]
91 %tmp4894 = icmp eq i32 %tmp488948906540, 1024 ; <i1> [#uses=1]
92 br i1 %tmp4894, label %bb4932, label %bb4897
93 bb4897: ; preds = %bb4884, %bb761
95 bb4932: ; preds = %bb4884
96 %tmp4933 = load i32, ptr null, align 4 ; <i32> [#uses=1]
97 br i1 %foo, label %bb5054, label %bb4940
98 bb4940: ; preds = %bb4932
99 %tmp4943 = load i32, ptr null, align 4 ; <i32> [#uses=2]
100 switch i32 %tmp4933, label %bb5054 [
101 i32 159, label %bb4970
102 i32 160, label %bb5002
104 bb4970: ; preds = %bb4940
105 %tmp49746536 = trunc i32 %tmp4943 to i16 ; <i16> [#uses=1]
106 %tmp49764977 = and i16 %tmp49746536, 4095 ; <i16> [#uses=1]
107 %mask498049814982 = zext i16 %tmp49764977 to i64 ; <i64> [#uses=1]
108 %tmp4984 = getelementptr %struct.FONT_INFO, ptr null, i64 %mask498049814982, i32 5 ; <ptr> [#uses=1]
109 %tmp4985 = load ptr, ptr %tmp4984, align 8 ; <ptr> [#uses=1]
110 %tmp4988 = getelementptr %struct.rec, ptr %tmp4985, i64 0, i32 0, i32 3 ; <ptr> [#uses=1]
111 %tmp4992 = load i32, ptr %tmp4988, align 8 ; <i32> [#uses=1]
112 %tmp49924993 = trunc i32 %tmp4992 to i16 ; <i16> [#uses=1]
113 %tmp4996 = add i16 %tmp49924993, 0 ; <i16> [#uses=1]
115 bb5002: ; preds = %bb4940
116 %tmp50066537 = trunc i32 %tmp4943 to i16 ; <i16> [#uses=1]
117 %tmp50085009 = and i16 %tmp50066537, 4095 ; <i16> [#uses=1]
118 %mask501250135014 = zext i16 %tmp50085009 to i64 ; <i64> [#uses=1]
119 %tmp5016 = getelementptr %struct.FONT_INFO, ptr null, i64 %mask501250135014, i32 5 ; <ptr> [#uses=1]
120 %tmp5017 = load ptr, ptr %tmp5016, align 8 ; <ptr> [#uses=1]
121 %tmp5020 = getelementptr %struct.rec, ptr %tmp5017, i64 0, i32 0, i32 3 ; <ptr> [#uses=1]
122 %tmp5024 = load i32, ptr %tmp5020, align 8 ; <i32> [#uses=1]
123 %tmp50245025 = trunc i32 %tmp5024 to i16 ; <i16> [#uses=1]
124 %tmp5028 = sub i16 %tmp50245025, 0 ; <i16> [#uses=1]
126 bb5054: ; preds = %bb5002, %bb4970, %bb4940, %bb4932
127 %flen.0.reg2mem.0 = phi i16 [ %tmp4996, %bb4970 ], [ %tmp5028, %bb5002 ], [ 0, %bb4932 ], [ undef, %bb4940 ] ; <i16> [#uses=0]