1 ; Just a test case for a crash reported in
2 ; https://bugs.llvm.org/show_bug.cgi?id=33636
3 ; RUN: llc -mtriple=powerpc64le-unknown-unknown -mcpu=pwr8 < %s | FileCheck %s
4 @g_225 = external unnamed_addr global i16, align 2
5 @g_756 = external global [6 x i32], align 4
6 @g_3456 = external global i32, align 4
7 @g_3708 = external global [9 x i32], align 4
8 @g_1252 = external global i8*, align 8
9 @g_3043 = external global float*, align 8
11 ; Function Attrs: nounwind
13 br i1 undef, label %1, label %4
15 ; <label>:1: ; preds = %0
16 br i1 undef, label %2, label %3
18 ; <label>:2: ; preds = %1
21 ; <label>:3: ; preds = %2, %1
24 ; <label>:4: ; preds = %3, %0
27 ; <label>:5: ; preds = %5, %4
28 br i1 undef, label %6, label %5
30 ; <label>:6: ; preds = %5
31 br i1 undef, label %7, label %8
33 ; <label>:7: ; preds = %6
34 br i1 undef, label %70, label %69
36 ; <label>:8: ; preds = %6
37 br i1 undef, label %9, label %50
39 ; <label>:9: ; preds = %8
42 ; <label>:10: ; preds = %28
43 br i1 undef, label %11, label %12
45 ; <label>:11: ; preds = %10, %9
48 ; <label>:12: ; preds = %10
51 ; <label>:13: ; preds = %23, %11
52 br i1 undef, label %17, label %14
54 ; <label>:14: ; preds = %13
55 br i1 undef, label %16, label %15
57 ; <label>:15: ; preds = %14
60 ; <label>:16: ; preds = %14
63 ; <label>:17: ; preds = %16, %13
64 br i1 undef, label %18, label %19
66 ; <label>:18: ; preds = %17
69 ; <label>:19: ; preds = %18, %17
70 br i1 undef, label %48, label %20
72 ; <label>:20: ; preds = %19
73 br i1 undef, label %48, label %21
75 ; <label>:21: ; preds = %20
78 ; <label>:22: ; preds = %21, %15
79 br i1 undef, label %23, label %24
81 ; <label>:23: ; preds = %22
84 ; <label>:24: ; preds = %22
85 br i1 undef, label %28, label %25
87 ; <label>:25: ; preds = %24
90 ; <label>:26: ; preds = %26, %25
91 br i1 undef, label %26, label %27
93 ; <label>:27: ; preds = %26
96 ; <label>:28: ; preds = %24
97 br i1 undef, label %29, label %10
99 ; <label>:29: ; preds = %28
102 ; <label>:30: ; preds = %33, %12
103 br i1 undef, label %32, label %33
105 ; <label>:31: ; preds = %33
108 ; <label>:32: ; preds = %30
111 ; <label>:33: ; preds = %32, %30
112 br i1 undef, label %30, label %31
114 ; <label>:34: ; preds = %47, %31
115 br i1 undef, label %35, label %36
117 ; <label>:35: ; preds = %34
120 ; <label>:36: ; preds = %35, %34
123 ; <label>:37: ; preds = %45, %36
124 br i1 undef, label %40, label %38
126 ; <label>:38: ; preds = %37
127 br i1 undef, label %39, label %46
129 ; <label>:39: ; preds = %38
132 ; <label>:40: ; preds = %37
135 ; <label>:41: ; preds = %40, %39
138 ; <label>:42: ; preds = %44, %41
139 br i1 undef, label %43, label %44
141 ; <label>:43: ; preds = %42
144 ; <label>:44: ; preds = %43, %42
145 br i1 undef, label %42, label %45
147 ; <label>:45: ; preds = %44
148 br i1 undef, label %37, label %47
150 ; <label>:46: ; preds = %38
153 ; <label>:47: ; preds = %45
154 br i1 undef, label %34, label %49
156 ; <label>:48: ; preds = %46, %29, %27, %20, %19
159 ; <label>:49: ; preds = %47
162 ; <label>:50: ; preds = %8
163 br i1 undef, label %52, label %51
165 ; <label>:51: ; preds = %50
168 ; <label>:52: ; preds = %50
171 ; <label>:53: ; preds = %56, %52
172 br i1 undef, label %54, label %59
174 ; <label>:54: ; preds = %53
175 br i1 undef, label %60, label %59
177 ; <label>:55: ; preds = %64
180 ; <label>:56: ; preds = %64, %55
181 br i1 undef, label %57, label %53
183 ; <label>:57: ; preds = %56, %51
186 ; <label>:58: ; preds = %57, %49
189 ; <label>:59: ; preds = %63, %62, %61, %60, %54, %53
192 ; <label>:60: ; preds = %54
193 br i1 undef, label %61, label %59
195 ; <label>:61: ; preds = %60
196 br i1 undef, label %62, label %59
198 ; <label>:62: ; preds = %61
199 br i1 undef, label %63, label %59
201 ; <label>:63: ; preds = %62
202 br i1 undef, label %64, label %59
204 ; <label>:64: ; preds = %63
205 br i1 undef, label %55, label %56
207 ; <label>:65: ; preds = %59, %58, %48
208 br i1 undef, label %66, label %67
210 ; <label>:66: ; preds = %65
213 ; <label>:67: ; preds = %66, %65
214 br i1 undef, label %68, label %92
216 ; <label>:68: ; preds = %67
219 ; <label>:69: ; preds = %7
222 ; <label>:70: ; preds = %69, %7
223 br i1 undef, label %72, label %71
225 ; <label>:71: ; preds = %70
228 ; <label>:72: ; preds = %71, %70
229 br i1 undef, label %73, label %74
231 ; <label>:73: ; preds = %72
234 ; <label>:74: ; preds = %73, %72
235 br i1 undef, label %85, label %75
237 ; <label>:75: ; preds = %74
238 br i1 undef, label %84, label %76
240 ; <label>:76: ; preds = %75
241 br i1 undef, label %78, label %77
243 ; <label>:77: ; preds = %77, %76
244 br i1 undef, label %84, label %77
246 ; <label>:78: ; preds = %76
249 ; <label>:79: ; preds = %83, %78
250 br i1 undef, label %83, label %80
252 ; <label>:80: ; preds = %79
253 br i1 undef, label %81, label %82
255 ; <label>:81: ; preds = %80
258 ; <label>:82: ; preds = %80
261 ; <label>:83: ; preds = %82, %81, %79
262 br i1 undef, label %90, label %79
264 ; <label>:84: ; preds = %77, %75
267 ; <label>:85: ; preds = %74
268 br i1 undef, label %86, label %88
270 ; <label>:86: ; preds = %85
271 br i1 undef, label %89, label %87
273 ; <label>:87: ; preds = %86
274 br i1 undef, label %89, label %88
276 ; <label>:88: ; preds = %87, %85
279 ; <label>:89: ; preds = %88, %87, %86
282 ; <label>:90: ; preds = %83
283 br i1 undef, label %92, label %91
285 ; <label>:91: ; preds = %90
288 ; <label>:92: ; preds = %91, %90, %89, %84, %68, %67
291 ; <label>:93: ; preds = %100, %92
294 ; <label>:94: ; preds = %98, %93
297 ; <label>:95: ; preds = %97, %94
298 br i1 undef, label %96, label %97
300 ; <label>:96: ; preds = %95
303 ; <label>:97: ; preds = %96, %95
304 br i1 undef, label %95, label %98
306 ; <label>:98: ; preds = %97
307 store i32 7, i32* getelementptr inbounds ([9 x i32], [9 x i32]* @g_3708, i64 0, i64 7), align 4
308 %99 = load volatile i32, i32* @g_3456, align 4
309 br i1 undef, label %94, label %100
311 ; <label>:100: ; preds = %98
312 br i1 undef, label %93, label %101
314 ; <label>:101: ; preds = %100
317 ; <label>:102: ; preds = %117, %101
320 ; <label>:103: ; preds = %109, %102
321 store i8** @g_1252, i8*** undef, align 8
322 br i1 undef, label %105, label %104
324 ; <label>:104: ; preds = %103
327 ; <label>:105: ; preds = %104, %103
328 %106 = icmp eq i32 0, 0
329 br i1 %106, label %107, label %116
331 ; <label>:107: ; preds = %105
332 br i1 icmp ne (i32* getelementptr inbounds ([6 x i32], [6 x i32]* @g_756, i64 0, i64 0), i32* getelementptr inbounds ([9 x i32], [9 x i32]* @g_3708, i64 0, i64 4)), label %109, label %108
334 ; <label>:108: ; preds = %107
337 ; <label>:109: ; preds = %108, %107
338 %110 = phi i32 [ sdiv (i32 32, i32 zext (i1 icmp eq (i32* getelementptr inbounds ([6 x i32], [6 x i32]* @g_756, i64 0, i64 0), i32* getelementptr inbounds ([9 x i32], [9 x i32]* @g_3708, i64 0, i64 4)) to i32)), %108 ], [ 32, %107 ]
339 %111 = trunc i32 %110 to i8
340 %112 = icmp ne i8 %111, 0
341 %113 = and i1 %112, icmp eq (i32* getelementptr inbounds ([6 x i32], [6 x i32]* @g_756, i64 0, i64 0), i32* getelementptr inbounds ([9 x i32], [9 x i32]* @g_3708, i64 0, i64 4))
342 %114 = zext i1 %113 to i16
343 store i16 %114, i16* @g_225, align 2
344 %115 = load volatile float*, float** @g_3043, align 8
345 br i1 undef, label %103, label %117
347 ; <label>:116: ; preds = %105
350 ; <label>:117: ; preds = %109
351 br i1 undef, label %102, label %118
353 ; <label>:118: ; preds = %117
356 ; <label>:119: ; preds = %118, %116
357 br i1 undef, label %120, label %231
359 ; <label>:120: ; preds = %119
362 ; <label>:121: ; preds = %230
365 ; <label>:122: ; preds = %230, %121
366 br i1 undef, label %124, label %123
368 ; <label>:123: ; preds = %122
371 ; <label>:124: ; preds = %123, %122
372 br i1 undef, label %228, label %225
374 ; <label>:125: ; preds = %218
377 ; <label>:126: ; preds = %218
380 ; <label>:127: ; preds = %216, %126, %125
381 br i1 undef, label %204, label %128
383 ; <label>:128: ; preds = %127
386 ; <label>:129: ; preds = %216
387 br i1 undef, label %131, label %130
389 ; <label>:130: ; preds = %129
392 ; <label>:131: ; preds = %130, %129
393 br i1 undef, label %133, label %132
395 ; <label>:132: ; preds = %131
398 ; <label>:133: ; preds = %132, %131
401 ; <label>:134: ; preds = %203, %133
402 br i1 undef, label %193, label %135
404 ; <label>:135: ; preds = %134
407 ; <label>:136: ; preds = %203
408 br i1 undef, label %138, label %137
410 ; <label>:137: ; preds = %136
413 ; <label>:138: ; preds = %137, %136
414 br i1 undef, label %192, label %139
416 ; <label>:139: ; preds = %138
419 ; <label>:140: ; preds = %191, %190
420 br i1 undef, label %180, label %141
422 ; <label>:141: ; preds = %140
425 ; <label>:142: ; preds = %190
426 br i1 undef, label %143, label %178
428 ; <label>:143: ; preds = %142
431 ; <label>:144: ; preds = %179
434 ; <label>:145: ; preds = %179
437 ; <label>:146: ; preds = %177, %175, %174
438 br i1 undef, label %165, label %147
440 ; <label>:147: ; preds = %146
443 ; <label>:148: ; preds = %174
446 ; <label>:149: ; preds = %164, %148
447 br i1 undef, label %154, label %150
449 ; <label>:150: ; preds = %149
452 ; <label>:151: ; preds = %164
453 br i1 undef, label %153, label %152
455 ; <label>:152: ; preds = %151
458 ; <label>:153: ; preds = %152, %151
461 ; <label>:154: ; preds = %149
464 ; <label>:155: ; preds = %154, %150
465 br i1 undef, label %157, label %156
467 ; <label>:156: ; preds = %155
470 ; <label>:157: ; preds = %155
473 ; <label>:158: ; preds = %157, %156
474 br i1 undef, label %160, label %159
476 ; <label>:159: ; preds = %158
479 ; <label>:160: ; preds = %158
482 ; <label>:161: ; preds = %160, %159
483 br i1 undef, label %163, label %162
485 ; <label>:162: ; preds = %161
488 ; <label>:163: ; preds = %161
491 ; <label>:164: ; preds = %163, %162
492 br i1 undef, label %151, label %149
494 ; <label>:165: ; preds = %146
497 ; <label>:166: ; preds = %165, %147
498 br i1 undef, label %168, label %167
500 ; <label>:167: ; preds = %166
503 ; <label>:168: ; preds = %166
506 ; <label>:169: ; preds = %168, %167
507 br i1 undef, label %171, label %170
509 ; <label>:170: ; preds = %169
512 ; <label>:171: ; preds = %169
515 ; <label>:172: ; preds = %171, %170
516 br i1 undef, label %174, label %173
518 ; <label>:173: ; preds = %172
521 ; <label>:174: ; preds = %173, %172
522 br i1 undef, label %148, label %146
524 ; <label>:175: ; preds = %176
527 ; <label>:176: ; preds = %145, %144
528 br i1 undef, label %177, label %175
530 ; <label>:177: ; preds = %176
533 ; <label>:178: ; preds = %142
536 ; <label>:179: ; preds = %178, %143
537 br i1 undef, label %145, label %144
539 ; <label>:180: ; preds = %140
542 ; <label>:181: ; preds = %180, %141
543 br i1 undef, label %183, label %182
545 ; <label>:182: ; preds = %181
548 ; <label>:183: ; preds = %181
551 ; <label>:184: ; preds = %183, %182
552 br i1 undef, label %186, label %185
554 ; <label>:185: ; preds = %184
557 ; <label>:186: ; preds = %184
560 ; <label>:187: ; preds = %186, %185
561 br i1 undef, label %189, label %188
563 ; <label>:188: ; preds = %187
566 ; <label>:189: ; preds = %187
569 ; <label>:190: ; preds = %189, %188
570 br i1 undef, label %142, label %140
572 ; <label>:191: ; preds = %192, %139
575 ; <label>:192: ; preds = %138
578 ; <label>:193: ; preds = %134
581 ; <label>:194: ; preds = %193, %135
582 br i1 undef, label %196, label %195
584 ; <label>:195: ; preds = %194
587 ; <label>:196: ; preds = %194
590 ; <label>:197: ; preds = %196, %195
591 br i1 undef, label %199, label %198
593 ; <label>:198: ; preds = %197
596 ; <label>:199: ; preds = %197
599 ; <label>:200: ; preds = %199, %198
600 br i1 undef, label %202, label %201
602 ; <label>:201: ; preds = %200
605 ; <label>:202: ; preds = %200
608 ; <label>:203: ; preds = %202, %201
609 br i1 undef, label %136, label %134
611 ; <label>:204: ; preds = %127
614 ; <label>:205: ; preds = %204, %128
615 br i1 undef, label %207, label %206
617 ; <label>:206: ; preds = %205
620 ; <label>:207: ; preds = %205
623 ; <label>:208: ; preds = %207, %206
624 br i1 undef, label %210, label %209
626 ; <label>:209: ; preds = %208
629 ; <label>:210: ; preds = %208
632 ; <label>:211: ; preds = %210, %209
633 br i1 undef, label %213, label %212
635 ; <label>:212: ; preds = %211
638 ; <label>:213: ; preds = %211
641 ; <label>:214: ; preds = %213, %212
642 br i1 undef, label %216, label %215
644 ; <label>:215: ; preds = %214
647 ; <label>:216: ; preds = %215, %214
648 br i1 undef, label %129, label %127
650 ; <label>:217: ; preds = %220
653 ; <label>:218: ; preds = %221, %217
654 br i1 undef, label %126, label %125
656 ; <label>:219: ; preds = %223
659 ; <label>:220: ; preds = %224, %219
660 br i1 undef, label %221, label %217
662 ; <label>:221: ; preds = %220
665 ; <label>:222: ; preds = %226
668 ; <label>:223: ; preds = %227, %222
669 br i1 undef, label %224, label %219
671 ; <label>:224: ; preds = %223
674 ; <label>:225: ; preds = %124
677 ; <label>:226: ; preds = %228, %225
678 br i1 undef, label %227, label %222
680 ; <label>:227: ; preds = %226
683 ; <label>:228: ; preds = %124
686 ; <label>:229: ; preds = %232
689 ; <label>:230: ; preds = %233, %229
690 br i1 undef, label %122, label %121
692 ; <label>:231: ; preds = %119
695 ; <label>:232: ; preds = %231, %120
696 br i1 undef, label %233, label %229
698 ; <label>:233: ; preds = %232