1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-none-unknown-linuxeabi -consthoist-gep %s -o - | FileCheck %s
4 %struct.blam = type { %struct.bar, %struct.bar.0, %struct.wobble, %struct.wombat, i8, i16, %struct.snork.2, %struct.foo, %struct.snork.3, %struct.wobble.4, %struct.quux, [9 x i16], %struct.spam, %struct.zot }
5 %struct.bar = type { i8, i8, %struct.snork }
6 %struct.snork = type { i16, i8, i8 }
7 %struct.bar.0 = type { i8, i8, i16, i8, i8, %struct.barney }
8 %struct.barney = type { i8, i8, i8, i8 }
9 %struct.wobble = type { i8, i8, %struct.eggs, %struct.bar.1 }
10 %struct.eggs = type { i8, i8, i8 }
11 %struct.bar.1 = type { i8, i8, i8, i8 }
12 %struct.wombat = type { i8, i8, i16, i32, i32, i32, i32 }
13 %struct.snork.2 = type { i8, i8, i8 }
14 %struct.foo = type { [12 x i32], [12 x i32], [4 x i32], i8, i8, i8, i8, i8, i8, i8, i8 }
15 %struct.snork.3 = type { i16, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i16 }
16 %struct.wobble.4 = type { i32, i32, i32, i32, i32, i32, i16, i16, i8, i8, i16, i32, i32, i16, i8, i8 }
17 %struct.quux = type { i32, %struct.foo.5, i8, i8, i8, i8, i32, %struct.snork.6, %struct.foo.7, [16 x i8], i16, i16, i8, i8, i8, i8, i32, i32, i32 }
18 %struct.foo.5 = type { i16, i8, i8 }
19 %struct.snork.6 = type { i16, i8, i8 }
20 %struct.foo.7 = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
21 %struct.spam = type { i8, i8 }
22 %struct.zot = type { [5 x i32], [3 x i32], [6 x i32], [3 x i32], [2 x i32], [4 x i32], [3 x i32], [2 x i32], [4 x i32], [5 x i32], [3 x i32], [6 x i32], [1 x i32], i32, i32, i32, i32, i32, i32 }
24 @global = external dso_local local_unnamed_addr global %struct.blam, align 4
26 ; Function Attrs: norecurse nounwind optsize ssp
27 define dso_local void @blam() local_unnamed_addr #0 {
29 ; CHECK: // %bb.0: // %bb
30 ; CHECK-NEXT: adrp x8, global+174
31 ; CHECK-NEXT: add x8, x8, :lo12:global+174
32 ; CHECK-NEXT: ldrb w9, [x8]
33 ; CHECK-NEXT: tbnz w9, #0, .LBB0_2
34 ; CHECK-NEXT: // %bb.1: // %bb3
35 ; CHECK-NEXT: mov w9, #44032 // =0xac00
36 ; CHECK-NEXT: mov w11, #172 // =0xac
37 ; CHECK-NEXT: movk w9, #12296, lsl #16
38 ; CHECK-NEXT: ldr w10, [x9]
39 ; CHECK-NEXT: stur w10, [x8, #158]
40 ; CHECK-NEXT: orr w10, w9, #0x4
41 ; CHECK-NEXT: ldr w10, [x10]
42 ; CHECK-NEXT: and w10, w10, #0xffff
43 ; CHECK-NEXT: stur w10, [x8, #162]
44 ; CHECK-NEXT: orr w10, w9, #0x8
45 ; CHECK-NEXT: ldr w10, [x10]
46 ; CHECK-NEXT: and w10, w10, #0x1f1f1f1f
47 ; CHECK-NEXT: stur w10, [x8, #166]
48 ; CHECK-NEXT: orr w10, w9, #0xc
49 ; CHECK-NEXT: ldr w10, [x10]
50 ; CHECK-NEXT: and w10, w10, #0x1f1f1f1f
51 ; CHECK-NEXT: stur w10, [x8, #170]
52 ; CHECK-NEXT: orr w8, w9, w11
53 ; CHECK-NEXT: adrp x10, global+528
54 ; CHECK-NEXT: add x10, x10, :lo12:global+528
55 ; CHECK-NEXT: ldr w8, [x8]
56 ; CHECK-NEXT: mov w11, #176 // =0xb0
57 ; CHECK-NEXT: and w8, w8, #0xffffff
58 ; CHECK-NEXT: str w8, [x10]
59 ; CHECK-NEXT: orr w8, w9, w11
60 ; CHECK-NEXT: mov w11, #180 // =0xb4
61 ; CHECK-NEXT: ldr w8, [x8]
62 ; CHECK-NEXT: and w8, w8, #0xffffff
63 ; CHECK-NEXT: str w8, [x10, #4]
64 ; CHECK-NEXT: orr w8, w9, w11
65 ; CHECK-NEXT: mov w11, #184 // =0xb8
66 ; CHECK-NEXT: ldr w8, [x8]
67 ; CHECK-NEXT: and w8, w8, #0xffffff
68 ; CHECK-NEXT: str w8, [x10, #8]
69 ; CHECK-NEXT: orr w8, w9, w11
70 ; CHECK-NEXT: ldr w8, [x8]
71 ; CHECK-NEXT: and w8, w8, #0xffffff
72 ; CHECK-NEXT: str w8, [x10, #12]
73 ; CHECK-NEXT: .LBB0_2: // %bb19
76 %tmp = load i8, ptr getelementptr inbounds (%struct.blam, ptr @global, i32 0, i32 7, i32 9), align 2, !tbaa !3
77 %tmp1 = and i8 %tmp, 1
78 %tmp2 = icmp eq i8 %tmp1, 0
79 br i1 %tmp2, label %bb3, label %bb19
82 %tmp4 = load volatile i32, ptr inttoptr (i32 805874688 to ptr), align 1024, !tbaa !23
83 store i32 %tmp4, ptr getelementptr inbounds (%struct.blam, ptr @global, i32 0, i32 13, i32 0, i32 0), align 4, !tbaa !23
84 %tmp5 = load volatile i32, ptr inttoptr (i32 805874692 to ptr), align 4, !tbaa !23
85 %tmp6 = and i32 %tmp5, 65535
86 store i32 %tmp6, ptr getelementptr inbounds (%struct.blam, ptr @global, i32 0, i32 13, i32 0, i32 1), align 4, !tbaa !23
87 %tmp7 = load volatile i32, ptr inttoptr (i32 805874696 to ptr), align 8, !tbaa !23
88 %tmp8 = and i32 %tmp7, 522133279
89 store i32 %tmp8, ptr getelementptr inbounds (%struct.blam, ptr @global, i32 0, i32 13, i32 0, i32 2), align 4, !tbaa !23
90 %tmp9 = load volatile i32, ptr inttoptr (i32 805874700 to ptr), align 4, !tbaa !23
91 %tmp10 = and i32 %tmp9, 522133279
92 store i32 %tmp10, ptr getelementptr inbounds (%struct.blam, ptr @global, i32 0, i32 13, i32 0, i32 3), align 4, !tbaa !23
93 %tmp11 = load volatile i32, ptr inttoptr (i32 805874860 to ptr), align 4, !tbaa !23
94 %tmp12 = and i32 %tmp11, 16777215
95 store i32 %tmp12, ptr getelementptr inbounds (%struct.blam, ptr @global, i32 0, i32 13, i32 15), align 4, !tbaa !24
96 %tmp13 = load volatile i32, ptr inttoptr (i32 805874864 to ptr), align 16, !tbaa !23
97 %tmp14 = and i32 %tmp13, 16777215
98 store i32 %tmp14, ptr getelementptr inbounds (%struct.blam, ptr @global, i32 0, i32 13, i32 16), align 4, !tbaa !25
99 %tmp15 = load volatile i32, ptr inttoptr (i32 805874868 to ptr), align 4, !tbaa !23
100 %tmp16 = and i32 %tmp15, 16777215
101 store i32 %tmp16, ptr getelementptr inbounds (%struct.blam, ptr @global, i32 0, i32 13, i32 17), align 4, !tbaa !26
102 %tmp17 = load volatile i32, ptr inttoptr (i32 805874872 to ptr), align 8, !tbaa !23
103 %tmp18 = and i32 %tmp17, 16777215
104 store i32 %tmp18, ptr getelementptr inbounds (%struct.blam, ptr @global, i32 0, i32 13, i32 18), align 4, !tbaa !27
107 bb19: ; preds = %bb3, %bb
111 attributes #0 = { norecurse nounwind optsize ssp "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
113 !llvm.module.flags = !{!0, !1}
116 !0 = !{i32 1, !"wchar_size", i32 4}
117 !1 = !{i32 1, !"min_enum_size", i32 1}
118 !2 = !{!"Snapdragon LLVM ARM Compiler 8.0.0 (based on LLVM 8.0.0)"}
119 !3 = !{!4, !6, i64 174}
120 !4 = !{!"", !5, i64 0, !10, i64 6, !12, i64 16, !14, i64 28, !6, i64 48, !9, i64 50, !13, i64 52, !16, i64 56, !17, i64 176, !18, i64 196, !19, i64 240, !6, i64 312, !21, i64 330, !22, i64 332}
121 !5 = !{!"", !6, i64 0, !6, i64 1, !8, i64 2}
122 !6 = !{!"omnipotent char", !7, i64 0}
123 !7 = !{!"Simple C/C++ TBAA"}
124 !8 = !{!"", !9, i64 0, !6, i64 2, !6, i64 3}
125 !9 = !{!"short", !6, i64 0}
126 !10 = !{!"", !6, i64 0, !6, i64 1, !9, i64 2, !6, i64 4, !6, i64 5, !11, i64 6}
127 !11 = !{!"", !6, i64 0, !6, i64 1, !6, i64 2, !6, i64 3}
128 !12 = !{!"", !6, i64 0, !6, i64 1, !13, i64 2, !11, i64 5}
129 !13 = !{!"", !6, i64 0, !6, i64 1, !6, i64 2}
130 !14 = !{!"", !6, i64 0, !6, i64 1, !9, i64 2, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16}
131 !15 = !{!"long", !6, i64 0}
132 !16 = !{!"", !6, i64 0, !6, i64 48, !6, i64 96, !6, i64 112, !6, i64 113, !6, i64 114, !6, i64 115, !6, i64 116, !6, i64 117, !6, i64 118, !6, i64 119}
133 !17 = !{!"", !9, i64 0, !6, i64 2, !6, i64 3, !6, i64 4, !6, i64 5, !6, i64 6, !6, i64 7, !6, i64 8, !6, i64 9, !6, i64 10, !6, i64 11, !6, i64 12, !6, i64 13, !6, i64 14, !6, i64 15, !9, i64 16}
134 !18 = !{!"", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !9, i64 24, !9, i64 26, !6, i64 28, !6, i64 29, !9, i64 30, !15, i64 32, !15, i64 36, !9, i64 40, !6, i64 42, !6, i64 43}
135 !19 = !{!"", !15, i64 0, !8, i64 4, !6, i64 8, !6, i64 9, !6, i64 10, !6, i64 11, !15, i64 12, !8, i64 16, !20, i64 20, !6, i64 36, !9, i64 52, !9, i64 54, !6, i64 56, !6, i64 57, !6, i64 58, !6, i64 59, !15, i64 60, !15, i64 64, !15, i64 68}
136 !20 = !{!"", !6, i64 0, !6, i64 1, !6, i64 2, !6, i64 3, !6, i64 4, !6, i64 5, !6, i64 6, !6, i64 7, !6, i64 8, !6, i64 9, !6, i64 10, !6, i64 11, !6, i64 12, !6, i64 13, !6, i64 14, !6, i64 15}
137 !21 = !{!"", !6, i64 0, !6, i64 1}
138 !22 = !{!"", !6, i64 0, !6, i64 20, !6, i64 32, !6, i64 56, !6, i64 68, !6, i64 76, !6, i64 92, !6, i64 104, !6, i64 112, !6, i64 128, !6, i64 148, !6, i64 160, !6, i64 184, !15, i64 188, !15, i64 192, !15, i64 196, !15, i64 200, !15, i64 204, !15, i64 208}
139 !23 = !{!15, !15, i64 0}
140 !24 = !{!4, !15, i64 528}
141 !25 = !{!4, !15, i64 532}
142 !26 = !{!4, !15, i64 536}
143 !27 = !{!4, !15, i64 540}