1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -arm-atomic-cfg-tidy=0 -mcpu=cortex-a8 -relocation-model=pic -frame-pointer=all | FileCheck %s
5 %0 = type { i16, i8, i8 }
6 %1 = type { [2 x i32], [2 x i32] }
8 %struct.FILE_POS = type { i8, i8, i16, i32 }
9 %struct.GAP = type { i8, i8, i16 }
10 %struct.LIST = type { ptr, ptr }
11 %struct.STYLE = type { %union.anon, %union.anon, i16, i16, i32 }
12 %struct.head_type = type { [2 x %struct.LIST], %union.FIRST_UNION, %union.SECOND_UNION, %union.THIRD_UNION, %union.FOURTH_UNION, ptr, %2, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 }
13 %union.FIRST_UNION = type { %struct.FILE_POS }
14 %union.FOURTH_UNION = type { %struct.STYLE }
15 %union.SECOND_UNION = type { %0 }
16 %union.THIRD_UNION = type { %1 }
17 %union.anon = type { %struct.GAP }
18 %union.rec = type { %struct.head_type }
20 @zz_hold = external global ptr ; <ptr> [#uses=2]
21 @zz_res = external global ptr ; <ptr> [#uses=1]
23 define ptr @Manifest(ptr %x, ptr %env, ptr %style, ptr %bthr, ptr %fthr, ptr %target, ptr %crs, i32 %ok, i32 %need_expand, ptr %enclose, i32 %fcr) nounwind {
24 ; CHECK-LABEL: Manifest:
25 ; CHECK: @ %bb.0: @ %entry
26 ; CHECK-NEXT: push {r4, r5, r6, r7, lr}
27 ; CHECK-NEXT: add r7, sp, #12
28 ; CHECK-NEXT: push.w {r8, r10, r11}
29 ; CHECK-NEXT: sub sp, #292
30 ; CHECK-NEXT: add.w r10, r7, #8
31 ; CHECK-NEXT: ldrd r8, lr, [r7, #20]
32 ; CHECK-NEXT: movs r5, #0
33 ; CHECK-NEXT: cmp r5, #0
34 ; CHECK-NEXT: ldm.w r10, {r4, r9, r10}
35 ; CHECK-NEXT: ldr.w r12, [r7, #28]
37 ; CHECK-NEXT: addne sp, #292
38 ; CHECK-NEXT: popne.w {r8, r10, r11}
39 ; CHECK-NEXT: popne {r4, r5, r6, r7, pc}
40 ; CHECK-NEXT: LBB0_1: @ %bb20
41 ; CHECK-NEXT: movs r5, #1
42 ; CHECK-NEXT: cmp r5, #0
43 ; CHECK-NEXT: bne LBB0_4
44 ; CHECK-NEXT: @ %bb.2: @ %bb20
45 ; CHECK-NEXT: beq LBB0_5
46 ; CHECK-NEXT: @ %bb.3: @ %bb420
47 ; CHECK-NEXT: movw r5, :lower16:(L_zz_hold$non_lazy_ptr-(LPC0_0+4))
48 ; CHECK-NEXT: movt r5, :upper16:(L_zz_hold$non_lazy_ptr-(LPC0_0+4))
49 ; CHECK-NEXT: movw r11, :lower16:(L_zz_res$non_lazy_ptr-(LPC0_1+4))
51 ; CHECK-NEXT: add r5, pc
52 ; CHECK-NEXT: movt r11, :upper16:(L_zz_res$non_lazy_ptr-(LPC0_1+4))
54 ; CHECK-NEXT: add r11, pc
55 ; CHECK-NEXT: ldr r5, [r5]
56 ; CHECK-NEXT: str r5, [sp, #32] @ 4-byte Spill
57 ; CHECK-NEXT: ldr.w r5, [r11]
58 ; CHECK-NEXT: mov.w r11, #0
59 ; CHECK-NEXT: str r5, [sp, #28] @ 4-byte Spill
60 ; CHECK-NEXT: ldr r5, [sp, #32] @ 4-byte Reload
61 ; CHECK-NEXT: str.w r11, [r5]
62 ; CHECK-NEXT: movs r5, #0
63 ; CHECK-NEXT: ldr r6, [sp, #28] @ 4-byte Reload
64 ; CHECK-NEXT: str r5, [r6]
65 ; CHECK-NEXT: ldr r5, [sp, #32] @ 4-byte Reload
66 ; CHECK-NEXT: str r0, [r5]
67 ; CHECK-NEXT: ldr r0, [r7, #32]
68 ; CHECK-NEXT: stm.w sp, {r4, r9, r10}
69 ; CHECK-NEXT: strd r8, lr, [sp, #12]
70 ; CHECK-NEXT: str.w r12, [sp, #20]
71 ; CHECK-NEXT: str r0, [sp, #24]
72 ; CHECK-NEXT: bl _Manifest
74 ; CHECK-NEXT: LBB0_4: @ %bb20
76 ; CHECK-NEXT: movne r0, #0
77 ; CHECK-NEXT: cmpne r0, #0
78 ; CHECK-NEXT: LBB0_5: @ %bb20
81 %xgaps.i = alloca [32 x ptr], align 4 ; <ptr> [#uses=0]
82 %ycomp.i = alloca [32 x ptr], align 4 ; <ptr> [#uses=0]
85 bb20: ; preds = %entry
86 switch i32 undef, label %bb1287 [
96 i32 780, label %bb1098
99 bb119: ; preds = %bb20, %bb20
102 bb420: ; preds = %bb20, %bb20
103 store volatile ptr null, ptr @zz_hold, align 4
104 store ptr null, ptr @zz_res, align 4
105 store volatile ptr %x, ptr @zz_hold, align 4
106 %0 = call ptr @Manifest(ptr undef, ptr %env, ptr %style, ptr %bthr, ptr %fthr, ptr %target, ptr %crs, i32 %ok, i32 %need_expand, ptr %enclose, i32 %fcr) nounwind ; <ptr> [#uses=0]
109 bb438: ; preds = %bb20, %bb20
112 bb533: ; preds = %bb20
115 bb569: ; preds = %bb20
118 bb745: ; preds = %bb20
121 bb1098: ; preds = %bb20
124 bb1287: ; preds = %bb20