1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -filetype=obj -o /dev/null < %s
3 ; RUN: llc -filetype=asm %s -o - | FileCheck %s
5 ; ModuleID = 'bugpoint-reduced-simplified.bc'
6 source_filename = "bugpoint-output-39ed676.bc"
7 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
8 target triple = "thumbv8m.base-arm-none-eabi"
10 @crc32_tab = external unnamed_addr global [256 x i32], align 4
11 @g_566 = external global ptr, align 4
15 ; CHECK: @ %bb.0: @ %entry
16 ; CHECK-NEXT: movw r0, :lower16:g_566
17 ; CHECK-NEXT: movt r0, :upper16:g_566
18 ; CHECK-NEXT: ldr r0, [r0]
19 ; CHECK-NEXT: movs r0, #0
20 ; CHECK-NEXT: cmp r0, #0
21 ; CHECK-NEXT: beq .LBB0_7
22 ; CHECK-NEXT: @ %bb.1: @ %for.cond7.preheader.i.lr.ph.i.i
23 ; CHECK-NEXT: bne .LBB0_7
24 ; CHECK-NEXT: .LBB0_2: @ %for.cond14.preheader.us.i.i.i
25 ; CHECK-NEXT: @ =>This Inner Loop Header: Depth=1
26 ; CHECK-NEXT: cbnz r0, .LBB0_6
27 ; CHECK-NEXT: @ %bb.3: @ %for.cond14.preheader.us.i.i.i
28 ; CHECK-NEXT: @ in Loop: Header=BB0_2 Depth=1
29 ; CHECK-NEXT: lsls r1, r0, #2
30 ; CHECK-NEXT: adr r2, .LJTI0_0
31 ; CHECK-NEXT: adds r1, r2, r1
32 ; CHECK-NEXT: mov pc, r1
33 ; CHECK-NEXT: @ %bb.4:
34 ; CHECK-NEXT: .p2align 2
35 ; CHECK-NEXT: .LJTI0_0:
36 ; CHECK-NEXT: b.w .LBB0_5
37 ; CHECK-NEXT: b.w .LBB0_6
38 ; CHECK-NEXT: b.w .LBB0_8
39 ; CHECK-NEXT: b.w .LBB0_7
40 ; CHECK-NEXT: b.w .LBB0_6
41 ; CHECK-NEXT: b.w .LBB0_6
42 ; CHECK-NEXT: b.w .LBB0_6
43 ; CHECK-NEXT: b.w .LBB0_6
44 ; CHECK-NEXT: b.w .LBB0_6
45 ; CHECK-NEXT: b.w .LBB0_6
46 ; CHECK-NEXT: b.w .LBB0_6
47 ; CHECK-NEXT: b.w .LBB0_5
48 ; CHECK-NEXT: .LBB0_5: @ %for.cond14.preheader.us.i.i.i
49 ; CHECK-NEXT: @ in Loop: Header=BB0_2 Depth=1
50 ; CHECK-NEXT: b .LBB0_2
51 ; CHECK-NEXT: .LBB0_6: @ %func_1.exit.loopexit
52 ; CHECK-NEXT: .LBB0_7: @ %for.end476.i.i.i.loopexit
53 ; CHECK-NEXT: .LBB0_8: @ %lbl_1394.i.i.i.loopexit
55 %0 = load volatile ptr, ptr @g_566, align 4
56 br label %func_16.exit.i.i.i
58 lbl_1394.i.i.i.loopexit: ; preds = %for.cond14.preheader.us.i.i.i
61 func_16.exit.i.i.i: ; preds = %entry
62 br i1 undef, label %for.cond7.preheader.i.lr.ph.i.i, label %for.end476.i.i.i.loopexit
64 for.cond7.preheader.i.lr.ph.i.i: ; preds = %func_16.exit.i.i.i
65 br i1 undef, label %for.end476.i.i.i.loopexit, label %for.cond7.preheader.i.i.preheader.i
67 for.cond7.preheader.i.i.preheader.i: ; preds = %for.cond7.preheader.i.lr.ph.i.i
68 br label %for.cond14.preheader.us.i.i.i
70 for.cond7.preheader.i.us.i.i: ; preds = %for.cond7.preheader.i.lr.ph.i.i
73 for.cond14.preheader.us.i.i.i: ; preds = %for.inc459.us.i.i.i, %for.cond7.preheader.i.i.preheader.i
74 switch i4 undef, label %func_1.exit.loopexit [
75 i4 0, label %for.inc459.us.i.i.i
76 i4 -5, label %for.inc459.us.i.i.i
77 i4 2, label %lbl_1394.i.i.i.loopexit
78 i4 3, label %for.end476.i.i.i.loopexit
81 for.inc459.us.i.i.i: ; preds = %for.cond14.preheader.us.i.i.i, %for.cond14.preheader.us.i.i.i
82 br label %for.cond14.preheader.us.i.i.i
84 for.end476.i.i.i.loopexit: ; preds = %for.cond14.preheader.us.i.i.i
87 func_1.exit.loopexit: ; preds = %for.cond14.preheader.us.i.i.i
88 %arrayidx.i63.i.i5252 = getelementptr inbounds [256 x i32], ptr @crc32_tab, i32 0, i32 undef