1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
2 ; RUN: llc < %s -mtriple=i386-apple-darwin | FileCheck %s
3 ; Make sure xorl operands are 32-bit registers.
5 %struct.tm = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr }
6 %struct.wxDateTime = type { %struct.wxLongLong }
7 %"struct.wxDateTime::TimeZone" = type { i32 }
8 %struct.wxLongLong = type { i64 }
9 %struct.wxString = type { %struct.wxStringBase }
10 %struct.wxStringBase = type { ptr }
11 @.str = external constant [27 x i32] ; <ptr> [#uses=1]
12 @.str4 = external constant [14 x i32] ; <ptr> [#uses=1]
13 @_ZZNK10wxDateTime5GetTmERKNS_8TimeZoneEE12__FUNCTION__ = external constant [6 x i8] ; <ptr> [#uses=1]
14 @.str33 = external constant [29 x i32] ; <ptr> [#uses=1]
15 @.str89 = external constant [5 x i32] ; <ptr> [#uses=1]
17 define void @_ZNK10wxDateTime6FormatEPKwRKNS_8TimeZoneE(ptr noalias sret(%struct.wxString) %agg.result, ptr %this, ptr %format, ptr %tz, i1 %foo) personality ptr @__gxx_personality_v0 {
18 ; CHECK-LABEL: _ZNK10wxDateTime6FormatEPKwRKNS_8TimeZoneE:
19 ; CHECK: ## %bb.0: ## %entry
20 ; CHECK-NEXT: pushl %ebp
21 ; CHECK-NEXT: .cfi_def_cfa_offset 8
22 ; CHECK-NEXT: pushl %ebx
23 ; CHECK-NEXT: .cfi_def_cfa_offset 12
24 ; CHECK-NEXT: pushl %edi
25 ; CHECK-NEXT: .cfi_def_cfa_offset 16
26 ; CHECK-NEXT: pushl %esi
27 ; CHECK-NEXT: .cfi_def_cfa_offset 20
28 ; CHECK-NEXT: subl $28, %esp
29 ; CHECK-NEXT: .cfi_def_cfa_offset 48
30 ; CHECK-NEXT: .cfi_offset %esi, -20
31 ; CHECK-NEXT: .cfi_offset %edi, -16
32 ; CHECK-NEXT: .cfi_offset %ebx, -12
33 ; CHECK-NEXT: .cfi_offset %ebp, -8
34 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %esi
35 ; CHECK-NEXT: movzbl {{[0-9]+}}(%esp), %ebx
36 ; CHECK-NEXT: testb $1, %bl
37 ; CHECK-NEXT: je LBB0_25
38 ; CHECK-NEXT: ## %bb.1: ## %bb116.i
39 ; CHECK-NEXT: je LBB0_25
40 ; CHECK-NEXT: ## %bb.2: ## %bb52.i.i
41 ; CHECK-NEXT: testb $1, %bl
42 ; CHECK-NEXT: je LBB0_25
43 ; CHECK-NEXT: ## %bb.3: ## %bb142.i
44 ; CHECK-NEXT: je LBB0_25
45 ; CHECK-NEXT: ## %bb.4:
46 ; CHECK-NEXT: movl L_.str89$non_lazy_ptr, %edi
47 ; CHECK-NEXT: movb $1, %bh
48 ; CHECK-NEXT: movl L_.str$non_lazy_ptr, %ebp
49 ; CHECK-NEXT: jmp LBB0_5
50 ; CHECK-NEXT: LBB0_21: ## %bb7806
51 ; CHECK-NEXT: ## in Loop: Header=BB0_5 Depth=1
53 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
54 ; CHECK-NEXT: movl $1, {{[0-9]+}}(%esp)
55 ; CHECK-NEXT: movl $0, (%esp)
56 ; CHECK-NEXT: calll __ZN12wxStringBase6appendEmw
58 ; CHECK-NEXT: LBB0_5: ## %bb3261
59 ; CHECK-NEXT: ## =>This Inner Loop Header: Depth=1
60 ; CHECK-NEXT: cmpl $37, 0
61 ; CHECK-NEXT: jne LBB0_25
62 ; CHECK-NEXT: ## %bb.6: ## %bb3306
63 ; CHECK-NEXT: ## in Loop: Header=BB0_5 Depth=1
65 ; CHECK-NEXT: movl %edi, {{[0-9]+}}(%esp)
66 ; CHECK-NEXT: movl $0, (%esp)
67 ; CHECK-NEXT: calll __ZN12wxStringBaseaSEPKw
69 ; CHECK-NEXT: ## %bb.7: ## %bb3314
70 ; CHECK-NEXT: ## in Loop: Header=BB0_5 Depth=1
71 ; CHECK-NEXT: movl 0, %eax
72 ; CHECK-NEXT: cmpl $121, %eax
73 ; CHECK-NEXT: ja LBB0_25
74 ; CHECK-NEXT: ## %bb.8: ## %bb3314
75 ; CHECK-NEXT: ## in Loop: Header=BB0_5 Depth=1
76 ; CHECK-NEXT: jmpl *LJTI0_0(,%eax,4)
77 ; CHECK-NEXT: LBB0_10: ## %bb5809
78 ; CHECK-NEXT: ## in Loop: Header=BB0_5 Depth=1
79 ; CHECK-NEXT: xorl %eax, %eax
80 ; CHECK-NEXT: testb %al, %al
81 ; CHECK-NEXT: jne LBB0_25
82 ; CHECK-NEXT: ## %bb.11: ## %bb5809
83 ; CHECK-NEXT: ## in Loop: Header=BB0_5 Depth=1
84 ; CHECK-NEXT: testb %bh, %bh
85 ; CHECK-NEXT: je LBB0_25
86 ; CHECK-NEXT: ## %bb.12: ## %bb91.i8504
87 ; CHECK-NEXT: ## in Loop: Header=BB0_5 Depth=1
88 ; CHECK-NEXT: testb $1, %bl
89 ; CHECK-NEXT: je LBB0_14
90 ; CHECK-NEXT: ## %bb.13: ## %bb155.i8541
91 ; CHECK-NEXT: ## in Loop: Header=BB0_5 Depth=1
93 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
94 ; CHECK-NEXT: movl $0, (%esp)
95 ; CHECK-NEXT: calll _gmtime_r
97 ; CHECK-NEXT: LBB0_14: ## %bb182.i8560
98 ; CHECK-NEXT: ## in Loop: Header=BB0_5 Depth=1
99 ; CHECK-NEXT: testb $1, %bl
100 ; CHECK-NEXT: je LBB0_15
101 ; CHECK-NEXT: ## %bb.16: ## %bb278.i8617
102 ; CHECK-NEXT: ## in Loop: Header=BB0_5 Depth=1
103 ; CHECK-NEXT: je LBB0_18
104 ; CHECK-NEXT: ## %bb.17: ## %bb440.i8663
105 ; CHECK-NEXT: ## in Loop: Header=BB0_5 Depth=1
107 ; CHECK-NEXT: movl L_.str4$non_lazy_ptr, %eax
108 ; CHECK-NEXT: movl %eax, {{[0-9]+}}(%esp)
109 ; CHECK-NEXT: movl L_.str33$non_lazy_ptr, %eax
110 ; CHECK-NEXT: movl %eax, {{[0-9]+}}(%esp)
111 ; CHECK-NEXT: movl L__ZZNK10wxDateTime5GetTmERKNS_8TimeZoneEE12__FUNCTION__$non_lazy_ptr, %eax
112 ; CHECK-NEXT: movl %eax, {{[0-9]+}}(%esp)
113 ; CHECK-NEXT: movl %ebp, (%esp)
114 ; CHECK-NEXT: movl $1717, {{[0-9]+}}(%esp) ## imm = 0x6B5
115 ; CHECK-NEXT: calll __Z10wxOnAssertPKwiPKcS0_S0_
117 ; CHECK-NEXT: jmp LBB0_18
118 ; CHECK-NEXT: LBB0_15: ## %bb187.i8591
119 ; CHECK-NEXT: ## in Loop: Header=BB0_5 Depth=1
120 ; CHECK-NEXT: jne LBB0_25
121 ; CHECK-NEXT: LBB0_18: ## %invcont5814
122 ; CHECK-NEXT: ## in Loop: Header=BB0_5 Depth=1
124 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
125 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
126 ; CHECK-NEXT: movl $0, (%esp)
127 ; CHECK-NEXT: calll __ZN8wxString6FormatEPKwz
128 ; CHECK-NEXT: subl $4, %esp
130 ; CHECK-NEXT: ## %bb.19: ## %invcont5831
131 ; CHECK-NEXT: ## in Loop: Header=BB0_5 Depth=1
132 ; CHECK-NEXT: Ltmp10:
133 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
134 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
135 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
136 ; CHECK-NEXT: movl $0, (%esp)
137 ; CHECK-NEXT: calll __ZN12wxStringBase10ConcatSelfEmPKwm
138 ; CHECK-NEXT: Ltmp11:
139 ; CHECK-NEXT: jmp LBB0_5
140 ; CHECK-NEXT: LBB0_9: ## %bb5657
141 ; CHECK-NEXT: Ltmp13:
142 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
143 ; CHECK-NEXT: movl %eax, {{[0-9]+}}(%esp)
144 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
145 ; CHECK-NEXT: movl %eax, (%esp)
146 ; CHECK-NEXT: calll __ZNK10wxDateTime12GetDayOfYearERKNS_8TimeZoneE
147 ; CHECK-NEXT: Ltmp14:
148 ; CHECK-NEXT: jmp LBB0_25
149 ; CHECK-NEXT: LBB0_20: ## %bb5968
151 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
152 ; CHECK-NEXT: movl $0, {{[0-9]+}}(%esp)
153 ; CHECK-NEXT: movl $0, (%esp)
154 ; CHECK-NEXT: calll __ZN8wxString6FormatEPKwz
155 ; CHECK-NEXT: subl $4, %esp
157 ; CHECK-NEXT: LBB0_25: ## %bb115.critedge.i
158 ; CHECK-NEXT: movl %esi, %eax
159 ; CHECK-NEXT: addl $28, %esp
160 ; CHECK-NEXT: popl %esi
161 ; CHECK-NEXT: popl %edi
162 ; CHECK-NEXT: popl %ebx
163 ; CHECK-NEXT: popl %ebp
164 ; CHECK-NEXT: retl $4
165 ; CHECK-NEXT: LBB0_23: ## %lpad.loopexit.split-lp
166 ; CHECK-NEXT: Ltmp15:
167 ; CHECK-NEXT: jmp LBB0_25
168 ; CHECK-NEXT: LBB0_24: ## %lpad8185
169 ; CHECK-NEXT: Ltmp12:
170 ; CHECK-NEXT: jmp LBB0_25
171 ; CHECK-NEXT: LBB0_22: ## %lpad.loopexit
172 ; CHECK-NEXT: Ltmp18:
173 ; CHECK-NEXT: jmp LBB0_25
174 ; CHECK-NEXT: Lfunc_end0:
176 br i1 %foo, label %bb116.i, label %bb115.critedge.i
177 bb115.critedge.i: ; preds = %entry
179 bb116.i: ; preds = %entry
180 br i1 %foo, label %bb52.i.i, label %bb3118
181 bb3118: ; preds = %bb116.i
183 bb52.i.i: ; preds = %bb116.i
184 br i1 %foo, label %bb142.i, label %bb115.critedge.i.i
185 bb115.critedge.i.i: ; preds = %bb52.i.i
187 bb142.i: ; preds = %bb52.i.i
188 br i1 %foo, label %bb161.i, label %bb182.i
189 bb161.i: ; preds = %bb142.i
191 bb182.i: ; preds = %bb142.i
193 bb3261: ; preds = %bb7834, %bb161.i
194 %tmp3263 = load i32, ptr null, align 4 ; <i32> [#uses=1]
195 %tmp3264 = icmp eq i32 %tmp3263, 37 ; <i1> [#uses=1]
196 br i1 %tmp3264, label %bb3306, label %bb3267
197 bb3267: ; preds = %bb3261
199 bb3306: ; preds = %bb3261
200 %tmp3310 = invoke ptr @_ZN12wxStringBaseaSEPKw( ptr null, ptr @.str89 )
201 to label %bb3314 unwind label %lpad ; <ptr> [#uses=0]
202 bb3314: ; preds = %bb3306
203 %tmp3316 = load i32, ptr null, align 4 ; <i32> [#uses=1]
204 switch i32 %tmp3316, label %bb7595 [
206 i32 37, label %bb7806
207 i32 66, label %bb3477
208 i32 72, label %bb5334
209 i32 73, label %bb5484
210 i32 77, label %bb6118
211 i32 83, label %bb6406
212 i32 85, label %bb6556
213 i32 87, label %bb6708
214 i32 89, label %bb7308
215 i32 98, label %bb3477
216 i32 99, label %bb3626
217 i32 100, label %bb5184
218 i32 106, label %bb5657
219 i32 108, label %bb5809
220 i32 109, label %bb5968
221 i32 119, label %bb6860
222 i32 120, label %bb3626
223 i32 121, label %bb7158
225 bb3477: ; preds = %bb3314, %bb3314
227 bb3626: ; preds = %bb3314, %bb3314
229 bb5184: ; preds = %bb3314
231 bb5334: ; preds = %bb3314
233 bb5484: ; preds = %bb3314
235 bb5657: ; preds = %bb3314
236 %tmp5661 = invoke zeroext i16 @_ZNK10wxDateTime12GetDayOfYearERKNS_8TimeZoneE( ptr %this, ptr %tz )
237 to label %invcont5660 unwind label %lpad ; <i16> [#uses=0]
238 invcont5660: ; preds = %bb5657
240 bb5809: ; preds = %bb3314
241 %tmp61.i.i8486 = icmp sgt i64 0, -1 ; <i1> [#uses=1]
242 %tmp95.i.i8490 = icmp slt i64 0, 2147483647000 ; <i1> [#uses=1]
243 %bothcond9308 = and i1 %tmp61.i.i8486, %tmp95.i.i8490 ; <i1> [#uses=1]
244 br i1 %bothcond9308, label %bb91.i8504, label %bb115.critedge.i.i8492
245 bb115.critedge.i.i8492: ; preds = %bb5809
247 bb91.i8504: ; preds = %bb5809
248 br i1 %foo, label %bb155.i8541, label %bb182.i8560
249 bb155.i8541: ; preds = %bb91.i8504
250 %tmp156.i85398700 = invoke ptr @gmtime_r( ptr null, ptr null )
251 to label %bb182.i8560 unwind label %lpad ; <ptr> [#uses=1]
252 bb182.i8560: ; preds = %bb155.i8541, %bb91.i8504
253 %tm48.0.i8558 = phi ptr [ null, %bb91.i8504 ], [ %tmp156.i85398700, %bb155.i8541 ] ; <ptr> [#uses=0]
254 br i1 %foo, label %bb278.i8617, label %bb187.i8591
255 bb187.i8591: ; preds = %bb182.i8560
256 %tmp245.i8588 = srem i64 0, 86400000 ; <i64> [#uses=1]
257 br i1 %foo, label %bb264.i8592, label %bb265.i8606
258 bb264.i8592: ; preds = %bb187.i8591
260 bb265.i8606: ; preds = %bb187.i8591
261 %tmp268269.i8593 = trunc i64 %tmp245.i8588 to i32 ; <i32> [#uses=1]
262 %tmp273.i8594 = srem i32 %tmp268269.i8593, 1000 ; <i32> [#uses=1]
263 %tmp273274.i8595 = trunc i32 %tmp273.i8594 to i16 ; <i16> [#uses=1]
264 br label %invcont5814
265 bb278.i8617: ; preds = %bb182.i8560
266 %timeOnly50.0.i8622 = add i32 0, 0 ; <i32> [#uses=1]
267 br i1 %foo, label %bb440.i8663, label %bb448.i8694
268 bb440.i8663: ; preds = %bb278.i8617
269 invoke void @_Z10wxOnAssertPKwiPKcS0_S0_( ptr @.str, i32 1717, ptr @_ZZNK10wxDateTime5GetTmERKNS_8TimeZoneEE12__FUNCTION__, ptr @.str33, ptr @.str4 )
270 to label %bb448.i8694 unwind label %lpad
271 bb448.i8694: ; preds = %bb440.i8663, %bb278.i8617
272 %tmp477.i8669 = srem i32 %timeOnly50.0.i8622, 1000 ; <i32> [#uses=1]
273 %tmp477478.i8670 = trunc i32 %tmp477.i8669 to i16 ; <i16> [#uses=1]
274 br label %invcont5814
275 invcont5814: ; preds = %bb448.i8694, %bb265.i8606
276 %tmp812.0.0 = phi i16 [ %tmp477478.i8670, %bb448.i8694 ], [ %tmp273274.i8595, %bb265.i8606 ] ; <i16> [#uses=1]
277 %tmp58165817 = zext i16 %tmp812.0.0 to i32 ; <i32> [#uses=1]
278 invoke void (ptr, ptr, ...) @_ZN8wxString6FormatEPKwz(ptr noalias sret(%struct.wxString) null, ptr null, i32 %tmp58165817 )
279 to label %invcont5831 unwind label %lpad
280 invcont5831: ; preds = %invcont5814
281 %tmp5862 = invoke zeroext i8 @_ZN12wxStringBase10ConcatSelfEmPKwm(ptr null, i32 0, ptr null, i32 0 )
282 to label %bb7834 unwind label %lpad8185 ; <i8> [#uses=0]
283 bb5968: ; preds = %bb3314
284 invoke void (ptr, ptr, ...) @_ZN8wxString6FormatEPKwz(ptr noalias sret(%struct.wxString) null, ptr null, i32 0 )
285 to label %invcont5981 unwind label %lpad
286 invcont5981: ; preds = %bb5968
288 bb6118: ; preds = %bb3314
290 bb6406: ; preds = %bb3314
292 bb6556: ; preds = %bb3314
294 bb6708: ; preds = %bb3314
296 bb6860: ; preds = %bb3314
298 bb7158: ; preds = %bb3314
300 bb7308: ; preds = %bb3314
302 bb7595: ; preds = %bb3314
304 bb7806: ; preds = %bb3314
305 %tmp7814 = invoke ptr @_ZN12wxStringBase6appendEmw( ptr null, i32 1, i32 0 )
306 to label %bb7834 unwind label %lpad ; <ptr> [#uses=0]
307 bb7819: ; preds = %bb3314
309 bb7834: ; preds = %bb7806, %invcont5831
311 lpad: ; preds = %bb7806, %bb5968, %invcont5814, %bb440.i8663, %bb155.i8541, %bb5657, %bb3306
312 %exn = landingpad {ptr, i32}
315 lpad8185: ; preds = %invcont5831
316 %exn8185 = landingpad {ptr, i32}
321 declare void @_Z10wxOnAssertPKwiPKcS0_S0_(ptr, i32, ptr, ptr, ptr)
323 declare zeroext i8 @_ZN12wxStringBase10ConcatSelfEmPKwm(ptr, i32, ptr, i32)
325 declare ptr @gmtime_r(ptr, ptr)
327 declare zeroext i16 @_ZNK10wxDateTime12GetDayOfYearERKNS_8TimeZoneE(ptr, ptr)
329 declare ptr @_ZN12wxStringBase6appendEmw(ptr, i32, i32)
331 declare ptr @_ZN12wxStringBaseaSEPKw(ptr, ptr)
333 declare void @_ZN8wxString6FormatEPKwz(ptr noalias sret(%struct.wxString) , ptr, ...)
335 declare i32 @__gxx_personality_v0(...)