1 ; RUN: llc -verify-machineinstrs -mcpu=pwr8 < %s | FileCheck %s
2 target datalayout = "E-m:e-i64:64-n32:64"
3 target triple = "powerpc64-unknown-linux"
5 %"class.Foam::messageStream.6" = type <{ %"class.Foam::string.5", i32, i32, i32, [4 x i8] }>
6 %"class.Foam::string.5" = type { %"class.std::basic_string.4" }
7 %"class.std::basic_string.4" = type { %"struct.std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider.3" }
8 %"struct.std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider.3" = type { ptr }
9 %"class.Foam::prefixOSstream.27" = type { %"class.Foam::OSstream.26", i8, %"class.Foam::string.5" }
10 %"class.Foam::OSstream.26" = type { %"class.Foam::Ostream.base.9", %"class.Foam::fileName.10", ptr }
11 %"class.Foam::Ostream.base.9" = type <{ %"class.Foam::IOstream.8", i16 }>
12 %"class.Foam::IOstream.8" = type { ptr, i32, [4 x i8], %"class.Foam::IOstream::versionNumber.7", i32, i32, i32, i32 }
13 %"class.Foam::IOstream::versionNumber.7" = type <{ double, i32, [4 x i8] }>
14 %"class.Foam::fileName.10" = type { %"class.Foam::string.5" }
15 %"class.std::basic_ostream.25" = type { ptr, %"class.std::basic_ios.24" }
16 %"class.std::basic_ios.24" = type { %"class.std::ios_base.16", ptr, i8, i8, ptr, ptr, ptr, ptr }
17 %"class.std::ios_base.16" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words.12", [8 x %"struct.std::ios_base::_Words.12"], i32, ptr, %"class.std::locale.15" }
18 %"struct.std::ios_base::_Callback_list.11" = type { ptr, ptr, i32, i32 }
19 %"struct.std::ios_base::_Words.12" = type { ptr, i64 }
20 %"class.std::locale.15" = type { ptr }
21 %"class.std::locale::_Impl.14" = type { i32, ptr, i64, ptr, ptr }
22 %"class.std::locale::facet.13" = type <{ ptr, i32, [4 x i8] }>
23 %"class.std::basic_streambuf.17" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale.15" }
24 %"class.std::ctype.21" = type <{ %"class.std::locale::facet.base.18", [4 x i8], ptr, i8, [7 x i8], ptr, ptr, ptr, i8, [256 x i8], [256 x i8], i8, [6 x i8] }>
25 %"class.std::locale::facet.base.18" = type <{ ptr, i32 }>
26 %struct.__locale_struct.20 = type { [13 x ptr], ptr, ptr, ptr, [13 x ptr] }
27 %struct.__locale_data.19 = type opaque
28 %"class.std::__gnu_cxx_ldbl128::num_put.22" = type { %"class.std::locale::facet.base.18", [4 x i8] }
29 %"class.std::__gnu_cxx_ldbl128::num_get.23" = type { %"class.std::locale::facet.base.18", [4 x i8] }
30 %"class.Foam::primitiveMesh.135" = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.Foam::DynamicList.40", %"class.Foam::HashSet.127", ptr, ptr, ptr, ptr }
31 %"class.Foam::List.116" = type opaque
32 %"class.Foam::List.0" = type { %"class.Foam::UList.119" }
33 %"class.Foam::UList.119" = type { i32, ptr }
34 %"class.Foam::edge.118" = type { %"class.Foam::FixedList.117" }
35 %"class.Foam::FixedList.117" = type { [2 x i32] }
36 %"class.Foam::List.5" = type { %"class.Foam::UList.6" }
37 %"class.Foam::UList.6" = type { i32, ptr }
38 %"class.Foam::cell.121" = type { %"class.Foam::List.3" }
39 %"class.Foam::List.3" = type { %"class.Foam::UList.4" }
40 %"class.Foam::UList.4" = type { i32, ptr }
41 %"class.Foam::List.1" = type { %"class.Foam::UList.2" }
42 %"class.Foam::UList.2" = type { i32, ptr }
43 %"class.Foam::DynamicList.40" = type <{ %"class.Foam::List.3", i32, [4 x i8] }>
44 %"class.Foam::HashSet.127" = type { %"class.Foam::HashTable.7" }
45 %"class.Foam::HashTable.7" = type { i32, i32, ptr }
46 %"struct.Foam::HashTable<Foam::nil, int, Foam::Hash<Foam::label> >::hashedEntry.125" = type <{ i32, [4 x i8], ptr, %"class.Foam::nil.124", [7 x i8] }>
47 %"class.Foam::nil.124" = type { i8 }
48 %"class.Foam::Field.11" = type { %"class.Foam::refCount.128", %"class.Foam::List.12" }
49 %"class.Foam::refCount.128" = type { i32 }
50 %"class.Foam::List.12" = type { %"class.Foam::UList.13" }
51 %"class.Foam::UList.13" = type { i32, ptr }
52 %"class.Foam::Field.131" = type { %"class.Foam::refCount.128", %"class.Foam::List.8" }
53 %"class.Foam::List.8" = type { %"class.Foam::UList.9" }
54 %"class.Foam::UList.9" = type { i32, ptr }
55 %"class.Foam::Vector.29" = type { %"class.Foam::VectorSpace.10" }
56 %"class.Foam::VectorSpace.10" = type { [3 x double] }
57 %"class.Foam::Ostream.189" = type <{ %"class.Foam::IOstream.8", i16, [6 x i8] }>
59 @_ZN4Foam4InfoE = external global %"class.Foam::messageStream.6", align 8
60 @.str27 = external unnamed_addr constant [24 x i8], align 1
61 @.str28 = external unnamed_addr constant [7 x i8], align 1
62 @_ZN4Foam4PoutE = external global %"class.Foam::prefixOSstream.27", align 8
64 define void @_ZN4Foam13checkTopologyERKNS_8polyMeshEbb(i1 zeroext %allTopology) #0 personality ptr @__gxx_personality_v0 {
66 br i1 undef, label %for.body, label %for.cond.cleanup
68 ; CHECK-LABEL: @_ZN4Foam13checkTopologyERKNS_8polyMeshEbb
70 ; CHECK: addis [[REG1:[0-9]+]], 2, .LC0@toc@ha
72 ; CHECK: ld {{[0-9]+}}, .LC0@toc@l([[REG1]])
84 for.cond.cleanup: ; preds = %entry
85 br i1 undef, label %if.then.i, label %if.else.i
87 if.then.i: ; preds = %for.cond.cleanup
88 br i1 undef, label %if.then.i1435, label %if.else.i1436
90 if.else.i: ; preds = %for.cond.cleanup
93 if.then.i1435: ; preds = %if.then.i
94 br label %_ZN4Foam12returnReduceIiNS_5sumOpIiEEEET_RKS3_RKT0_ii.exit
96 if.else.i1436: ; preds = %if.then.i
97 br label %_ZN4Foam12returnReduceIiNS_5sumOpIiEEEET_RKS3_RKT0_ii.exit
99 _ZN4Foam12returnReduceIiNS_5sumOpIiEEEET_RKS3_RKT0_ii.exit: ; preds = %if.else.i1436, %if.then.i1435
100 br i1 undef, label %for.body.i, label %_ZNK4Foam8ZoneMeshINS_8cellZoneENS_8polyMeshEE15checkDefinitionEb.exit
102 for.body: ; preds = %entry
105 for.body.i: ; preds = %_ZN4Foam12returnReduceIiNS_5sumOpIiEEEET_RKS3_RKT0_ii.exit
108 _ZNK4Foam8ZoneMeshINS_8cellZoneENS_8polyMeshEE15checkDefinitionEb.exit: ; preds = %_ZN4Foam12returnReduceIiNS_5sumOpIiEEEET_RKS3_RKT0_ii.exit
109 br i1 undef, label %for.body.i1480, label %_ZNK4Foam8ZoneMeshINS_8faceZoneENS_8polyMeshEE15checkDefinitionEb.exit
111 for.body.i1480: ; preds = %_ZNK4Foam8ZoneMeshINS_8cellZoneENS_8polyMeshEE15checkDefinitionEb.exit
114 _ZNK4Foam8ZoneMeshINS_8faceZoneENS_8polyMeshEE15checkDefinitionEb.exit: ; preds = %_ZNK4Foam8ZoneMeshINS_8cellZoneENS_8polyMeshEE15checkDefinitionEb.exit
115 br i1 undef, label %for.body.i1504, label %_ZNK4Foam8ZoneMeshINS_9pointZoneENS_8polyMeshEE15checkDefinitionEb.exit
117 for.body.i1504: ; preds = %_ZNK4Foam8ZoneMeshINS_8faceZoneENS_8polyMeshEE15checkDefinitionEb.exit
120 _ZNK4Foam8ZoneMeshINS_9pointZoneENS_8polyMeshEE15checkDefinitionEb.exit: ; preds = %_ZNK4Foam8ZoneMeshINS_8faceZoneENS_8polyMeshEE15checkDefinitionEb.exit
121 invoke void @_ZN4Foam4word12stripInvalidEv()
122 to label %_ZN4Foam4wordC2EPKcb.exit unwind label %lpad.i
124 lpad.i: ; preds = %_ZNK4Foam8ZoneMeshINS_9pointZoneENS_8polyMeshEE15checkDefinitionEb.exit
125 %0 = landingpad { ptr, i32 }
127 resume { ptr, i32 } %0
129 _ZN4Foam4wordC2EPKcb.exit: ; preds = %_ZNK4Foam8ZoneMeshINS_9pointZoneENS_8polyMeshEE15checkDefinitionEb.exit
130 invoke void @_ZN4Foam7cellSetC1ERKNS_8polyMeshERKNS_4wordEiNS_8IOobject11writeOptionE()
131 to label %invoke.cont59 unwind label %lpad
133 invoke.cont59: ; preds = %_ZN4Foam4wordC2EPKcb.exit
134 br i1 undef, label %_ZNSsD2Ev.exit, label %if.then.i.i, !prof !1
136 if.then.i.i: ; preds = %invoke.cont59
137 br i1 true, label %if.then.i.i.i1508, label %if.else.i.i.i
139 if.then.i.i.i1508: ; preds = %if.then.i.i
140 br label %_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii.exit.i.i
142 if.else.i.i.i: ; preds = %if.then.i.i
143 br label %_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii.exit.i.i
145 _ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii.exit.i.i: ; preds = %if.else.i.i.i, %if.then.i.i.i1508
146 br i1 undef, label %if.then4.i.i, label %_ZNSsD2Ev.exit
148 if.then4.i.i: ; preds = %_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii.exit.i.i
149 br label %_ZNSsD2Ev.exit
151 _ZNSsD2Ev.exit: ; preds = %if.then4.i.i, %_ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii.exit.i.i, %invoke.cont59
152 br i1 undef, label %for.body70, label %for.cond.cleanup69
154 for.cond.cleanup69: ; preds = %_ZNSsD2Ev.exit
155 br i1 undef, label %if.then121, label %if.else
157 lpad: ; preds = %_ZN4Foam4wordC2EPKcb.exit
158 %1 = landingpad { ptr, i32 }
160 br i1 undef, label %_ZNSsD2Ev.exit1578, label %if.then.i.i1570, !prof !1
162 if.then.i.i1570: ; preds = %lpad
163 br i1 undef, label %if.then4.i.i1577, label %_ZNSsD2Ev.exit1578
165 if.then4.i.i1577: ; preds = %if.then.i.i1570
168 _ZNSsD2Ev.exit1578: ; preds = %if.then.i.i1570, %lpad
171 for.body70: ; preds = %_ZNSsD2Ev.exit
174 if.then121: ; preds = %for.cond.cleanup69
177 if.else: ; preds = %for.cond.cleanup69
178 invoke void @_ZN4Foam4word12stripInvalidEv()
179 to label %_ZN4Foam4wordC2EPKcb.exit1701 unwind label %lpad.i1689
181 lpad.i1689: ; preds = %if.else
182 %2 = landingpad { ptr, i32 }
186 _ZN4Foam4wordC2EPKcb.exit1701: ; preds = %if.else
187 invoke void @_ZN4Foam8pointSetC1ERKNS_8polyMeshERKNS_4wordEiNS_8IOobject11writeOptionE()
188 to label %invoke.cont169 unwind label %lpad165
190 invoke.cont169: ; preds = %_ZN4Foam4wordC2EPKcb.exit1701
191 %call177 = invoke zeroext i1 undef(ptr undef, i1 zeroext true, ptr undef)
192 to label %invoke.cont176 unwind label %lpad175
194 invoke.cont176: ; preds = %invoke.cont169
195 br i1 %call177, label %if.then178, label %if.end213
197 if.then178: ; preds = %invoke.cont176
200 lpad165: ; preds = %_ZN4Foam4wordC2EPKcb.exit1701
201 %3 = landingpad { ptr, i32 }
205 lpad175: ; preds = %invoke.cont169
206 %4 = landingpad { ptr, i32 }
208 invoke void @_ZN4Foam8pointSetD1Ev()
209 to label %eh.resume unwind label %terminate.lpad
211 if.end213: ; preds = %invoke.cont176
212 invoke void @_ZN4Foam4word12stripInvalidEv()
213 to label %_ZN4Foam4wordC2EPKcb.exit1777 unwind label %lpad.i1765
215 lpad.i1765: ; preds = %if.end213
216 %5 = landingpad { ptr, i32 }
218 br i1 undef, label %eh.resume.i1776, label %if.then.i.i.i1767, !prof !1
220 if.then.i.i.i1767: ; preds = %lpad.i1765
223 eh.resume.i1776: ; preds = %lpad.i1765
224 resume { ptr, i32 } %5
226 _ZN4Foam4wordC2EPKcb.exit1777: ; preds = %if.end213
227 invoke void @_ZN4Foam7faceSetC1ERKNS_8polyMeshERKNS_4wordEiNS_8IOobject11writeOptionE()
228 to label %invoke.cont221 unwind label %lpad217
230 invoke.cont221: ; preds = %_ZN4Foam4wordC2EPKcb.exit1777
231 br i1 undef, label %_ZNSsD2Ev.exit1792, label %if.then.i.i1784, !prof !1
233 if.then.i.i1784: ; preds = %invoke.cont221
234 br i1 undef, label %if.then4.i.i1791, label %_ZNSsD2Ev.exit1792
236 if.then4.i.i1791: ; preds = %if.then.i.i1784
237 br label %_ZNSsD2Ev.exit1792
239 _ZNSsD2Ev.exit1792: ; preds = %if.then4.i.i1791, %if.then.i.i1784, %invoke.cont221
240 %call232 = invoke zeroext i1 undef(ptr undef, i1 zeroext true, ptr undef)
241 to label %invoke.cont231 unwind label %lpad230
243 invoke.cont231: ; preds = %_ZNSsD2Ev.exit1792
244 invoke void @_ZN4Foam6reduceIiNS_5sumOpIiEEEEvRKNS_4ListINS_8UPstream11commsStructEEERT_RKT0_ii()
245 to label %invoke.cont243 unwind label %lpad230
247 lpad217: ; preds = %_ZN4Foam4wordC2EPKcb.exit1777
248 %6 = landingpad { ptr, i32 }
252 lpad230: ; preds = %invoke.cont231, %_ZNSsD2Ev.exit1792
253 %7 = landingpad { ptr, i32 }
255 invoke void @_ZN4Foam7faceSetD1Ev()
256 to label %eh.resume unwind label %terminate.lpad
258 invoke.cont243: ; preds = %invoke.cont231
259 invoke void @_ZN4Foam4word12stripInvalidEv()
260 to label %_ZN4Foam4wordC2EPKcb.exit1862 unwind label %lpad.i1850
262 lpad.i1850: ; preds = %invoke.cont243
263 %8 = landingpad { ptr, i32 }
267 _ZN4Foam4wordC2EPKcb.exit1862: ; preds = %invoke.cont243
268 invoke void @_ZN4Foam7faceSetC1ERKNS_8polyMeshERKNS_4wordEiNS_8IOobject11writeOptionE()
269 to label %invoke.cont280 unwind label %lpad276
271 invoke.cont280: ; preds = %_ZN4Foam4wordC2EPKcb.exit1862
272 br i1 undef, label %_ZNSsD2Ev.exit1877, label %if.then.i.i1869, !prof !1
274 if.then.i.i1869: ; preds = %invoke.cont280
277 _ZNSsD2Ev.exit1877: ; preds = %invoke.cont280
278 br i1 undef, label %if.then292, label %if.end328
280 if.then292: ; preds = %_ZNSsD2Ev.exit1877
283 lpad276: ; preds = %_ZN4Foam4wordC2EPKcb.exit1862
284 %9 = landingpad { ptr, i32 }
288 if.end328: ; preds = %_ZNSsD2Ev.exit1877
289 br i1 %allTopology, label %if.then331, label %if.end660
291 if.then331: ; preds = %if.end328
294 if.end660: ; preds = %if.end328
295 invoke void @_ZN4Foam13messageStreamcvRNS_8OSstreamEEv()
296 to label %invoke.cont668 unwind label %lpad663
298 invoke.cont668: ; preds = %if.end660
299 %call671 = invoke dereferenceable(56) ptr @_ZN4FoamlsERNS_7OstreamEPKc()
300 to label %invoke.cont670 unwind label %lpad663
302 invoke.cont670: ; preds = %invoke.cont668
303 invoke void @_ZN4FoamlsERNS_7OstreamEi()
304 to label %invoke.cont674 unwind label %lpad663
306 invoke.cont674: ; preds = %invoke.cont670
307 %call677 = invoke dereferenceable(56) ptr @_ZN4FoamlsERNS_7OstreamEPKc()
308 to label %invoke.cont676 unwind label %lpad663
310 invoke.cont676: ; preds = %invoke.cont674
311 invoke void undef(ptr %call677)
312 to label %if.end878 unwind label %lpad663
314 lpad663: ; preds = %invoke.cont670, %if.end660, %invoke.cont668, %invoke.cont674, %invoke.cont676
315 %10 = landingpad { ptr, i32 }
317 br i1 undef, label %_ZN4Foam4ListIiED2Ev.exit.i3073, label %delete.notnull.i.i3071
319 if.end878: ; preds = %invoke.cont676
320 br i1 undef, label %_ZN4Foam11regionSplitD2Ev.exit, label %delete.notnull.i.i3056
322 delete.notnull.i.i3056: ; preds = %if.end878
325 _ZN4Foam11regionSplitD2Ev.exit: ; preds = %if.end878
326 br i1 undef, label %if.then883, label %if.else888
328 if.then883: ; preds = %_ZN4Foam11regionSplitD2Ev.exit
331 delete.notnull.i.i3071: ; preds = %lpad663
334 _ZN4Foam4ListIiED2Ev.exit.i3073: ; preds = %lpad663
335 invoke void @_ZN4Foam11regIOobjectD2Ev()
336 to label %eh.resume unwind label %terminate.lpad
338 if.else888: ; preds = %_ZN4Foam11regionSplitD2Ev.exit
339 invoke void @_ZN4Foam4word12stripInvalidEv()
340 to label %_ZN4Foam4wordC2EPKcb.exit3098 unwind label %lpad.i3086
342 lpad.i3086: ; preds = %if.else888
343 %11 = landingpad { ptr, i32 }
347 _ZN4Foam4wordC2EPKcb.exit3098: ; preds = %if.else888
348 invoke void @_ZN4Foam8pointSetC1ERKNS_8polyMeshERKNS_4wordEiNS_8IOobject11writeOptionE()
349 to label %invoke.cont902 unwind label %lpad898
351 invoke.cont902: ; preds = %_ZN4Foam4wordC2EPKcb.exit3098
352 br i1 undef, label %_ZNSsD2Ev.exit3113, label %if.then.i.i3105, !prof !1
354 if.then.i.i3105: ; preds = %invoke.cont902
355 br i1 undef, label %if.then4.i.i3112, label %_ZNSsD2Ev.exit3113
357 if.then4.i.i3112: ; preds = %if.then.i.i3105
360 _ZNSsD2Ev.exit3113: ; preds = %if.then.i.i3105, %invoke.cont902
361 %call.i31163117 = invoke zeroext i32 undef(ptr @_ZN4Foam4PoutE)
362 to label %call.i3116.noexc unwind label %lpad905.loopexit.split-lp
364 call.i3116.noexc: ; preds = %_ZNSsD2Ev.exit3113
365 %call5.i3118 = invoke zeroext i32 null(ptr @_ZN4Foam4PoutE, i32 zeroext undef)
366 to label %invoke.cont906 unwind label %lpad905.loopexit.split-lp
368 invoke.cont906: ; preds = %call.i3116.noexc
371 lpad898: ; preds = %_ZN4Foam4wordC2EPKcb.exit3098
372 %12 = landingpad { ptr, i32 }
374 br i1 undef, label %_ZNSsD2Ev.exit3204, label %if.then.i.i3196, !prof !1
376 if.then.i.i3196: ; preds = %lpad898
379 _ZNSsD2Ev.exit3204: ; preds = %lpad898
382 lpad905.loopexit.split-lp: ; preds = %call.i3116.noexc, %_ZNSsD2Ev.exit3113
383 %lpad.loopexit.split-lp = landingpad { ptr, i32 }
385 invoke void @_ZN4Foam8pointSetD1Ev()
386 to label %eh.resume unwind label %terminate.lpad
388 eh.resume: ; preds = %_ZN4Foam4ListIiED2Ev.exit.i3073, %lpad230, %lpad175, %lpad905.loopexit.split-lp, %lpad217
389 resume { ptr, i32 } undef
391 terminate.lpad: ; preds = %_ZN4Foam4ListIiED2Ev.exit.i3073, %lpad230, %lpad175, %lpad905.loopexit.split-lp
392 %13 = landingpad { ptr, i32 }
397 declare dereferenceable(56) ptr @_ZN4FoamlsERNS_7OstreamEPKc() #0
399 declare void @_ZN4Foam13messageStreamcvRNS_8OSstreamEEv() #0
401 declare i32 @__gxx_personality_v0(...)
403 declare void @_ZN4Foam7cellSetC1ERKNS_8polyMeshERKNS_4wordEiNS_8IOobject11writeOptionE() #0
405 declare void @_ZN4FoamlsERNS_7OstreamEi() #0
407 declare void @_ZN4Foam8pointSetC1ERKNS_8polyMeshERKNS_4wordEiNS_8IOobject11writeOptionE() #0
409 declare void @_ZN4Foam8pointSetD1Ev() #0
411 declare void @_ZN4Foam7faceSetC1ERKNS_8polyMeshERKNS_4wordEiNS_8IOobject11writeOptionE() #0
413 declare void @_ZN4Foam7faceSetD1Ev() #0
415 ; Function Attrs: inlinehint
416 declare void @_ZN4Foam4word12stripInvalidEv() #1 align 2
418 declare void @_ZN4Foam11regIOobjectD2Ev() #0
420 declare void @_ZN4Foam6reduceIiNS_5sumOpIiEEEEvRKNS_4ListINS_8UPstream11commsStructEEERT_RKT0_ii() #0
422 attributes #0 = { "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
423 attributes #1 = { inlinehint "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
425 !llvm.module.flags = !{!0}
427 !0 = !{i32 1, !"PIC Level", i32 2}
428 !1 = !{!"branch_weights", i32 64, i32 4}