1 ; RUN: llc -relocation-model=static -mtriple=armv7a--none-eabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM_RO_ABS --check-prefix=ARM_RW_ABS
2 ; RUN: llc -relocation-model=ropi -mtriple=armv7a--none-eabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM_RO_PC --check-prefix=ARM_RW_ABS
3 ; RUN: llc -relocation-model=rwpi -mtriple=armv7a--none-eabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM_RO_ABS --check-prefix=ARM_RW_SB
4 ; RUN: llc -relocation-model=ropi-rwpi -mtriple=armv7a--none-eabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM_RO_PC --check-prefix=ARM_RW_SB
6 ; RUN: llc -relocation-model=static -mtriple=thumbv7m--none-eabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB2_RO_ABS --check-prefix=THUMB2_RW_ABS
7 ; RUN: llc -relocation-model=ropi -mtriple=thumbv7m--none-eabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB2_RO_PC --check-prefix=THUMB2_RW_ABS
8 ; RUN: llc -relocation-model=rwpi -mtriple=thumbv7m--none-eabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB2_RO_ABS --check-prefix=THUMB2_RW_SB
9 ; RUN: llc -relocation-model=ropi-rwpi -mtriple=thumbv7m--none-eabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB2_RO_PC --check-prefix=THUMB2_RW_SB
11 ; RUN: llc -relocation-model=static -mtriple=thumbv6m--none-eabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB1_RO_ABS --check-prefix=THUMB1_RW_ABS
12 ; RUN: llc -relocation-model=ropi -mtriple=thumbv6m--none-eabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB1_RO_PC --check-prefix=THUMB1_RW_ABS
13 ; RUN: llc -relocation-model=rwpi -mtriple=thumbv6m--none-eabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB1_RO_ABS --check-prefix=THUMB1_RW_SB
14 ; RUN: llc -relocation-model=ropi-rwpi -mtriple=thumbv6m--none-eabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=THUMB1_RO_PC --check-prefix=THUMB1_RW_SB
16 ; RUN: llc -relocation-model=rwpi -mtriple=armv7a--none-eabi -mattr=no-movt < %s | FileCheck %s --check-prefix=CHECK --check-prefix=NO_MOVT_ARM_RO_ABS --check-prefix=NO_MOVT_ARM_RW_SB
17 ; RUN: llc -relocation-model=ropi-rwpi -mtriple=armv7a--none-eabi -mattr=no-movt < %s | FileCheck %s --check-prefix=CHECK --check-prefix=NO_MOVT_ARM_RO_PC --check-prefix=NO_MOVT_ARM_RW_SB
19 ; RUN: llc -relocation-model=rwpi -mtriple=thumbv7m--none-eabi -mattr=no-movt < %s | FileCheck %s --check-prefix=CHECK --check-prefix=NO_MOVT_THUMB2_RO_ABS --check-prefix=NO_MOVT_THUMB2_RW_SB
20 ; RUN: llc -relocation-model=ropi-rwpi -mtriple=thumbv7m--none-eabi -mattr=no-movt < %s | FileCheck %s --check-prefix=CHECK --check-prefix=NO_MOVT_THUMB2_RO_PC --check-prefix=NO_MOVT_THUMB2_RW_SB
22 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
24 @a = external global i32, align 4
25 @b = external constant i32, align 4
29 %0 = load i32, i32* @a, align 4
33 ; ARM_RW_ABS: movw r[[REG:[0-9]]], :lower16:a
34 ; ARM_RW_ABS: movt r[[REG]], :upper16:a
35 ; ARM_RW_ABS: ldr r0, [r[[REG]]]
37 ; ARM_RW_SB: movw r[[REG:[0-9]]], :lower16:a(sbrel)
38 ; ARM_RW_SB: movt r[[REG]], :upper16:a(sbrel)
39 ; ARM_RW_SB: ldr r0, [r9, r[[REG]]]
41 ; NO_MOVT_ARM_RW_SB: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
42 ; NO_MOVT_ARM_RW_SB: ldr r0, [r9, r[[REG]]]
44 ; THUMB2_RW_ABS: movw r[[REG:[0-9]]], :lower16:a
45 ; THUMB2_RW_ABS: movt r[[REG]], :upper16:a
46 ; THUMB2_RW_ABS: ldr r0, [r[[REG]]]
48 ; THUMB2_RW_SB: movw r[[REG:[0-9]]], :lower16:a(sbrel)
49 ; THUMB2_RW_SB: movt r[[REG]], :upper16:a(sbrel)
50 ; THUMB2_RW_SB: ldr.w r0, [r9, r[[REG]]]
52 ; NO_MOVT_THUMB2_RW_SB: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
53 ; NO_MOVT_THUMB2_RW_SB: ldr.w r0, [r9, r[[REG]]]
55 ; THUMB1_RW_ABS: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
56 ; THUMB1_RW_ABS: ldr r0, [r[[REG]]]
58 ; THUMB1_RW_SB: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
59 ; THUMB1_RW_SB: mov r[[REG_SB:[0-9]+]], r9
60 ; THUMB1_RW_SB: ldr r0, [r[[REG_SB]], r[[REG]]]
62 ; CHECK: {{(bx lr|pop)}}
64 ; NO_MOVT_ARM_RW_SB: [[LCPI]]
65 ; NO_MOVT_ARM_RW_SB: .long a(sbrel)
67 ; NO_MOVT_THUMB2_RW_SB: [[LCPI]]
68 ; NO_MOVT_THUMB2_RW_SB: .long a(sbrel)
70 ; THUMB1_RW_ABS: [[LCPI]]
71 ; THUMB1_RW_ABS-NEXT: .long a
73 ; THUMB1_RW_SB: [[LCPI]]
74 ; THUMB1_RW_SB: .long a(sbrel)
77 define void @write(i32 %v) {
79 store i32 %v, i32* @a, align 4
83 ; ARM_RW_ABS: movw r[[REG:[0-9]]], :lower16:a
84 ; ARM_RW_ABS: movt r[[REG]], :upper16:a
85 ; ARM_RW_ABS: str r0, [r[[REG:[0-9]]]]
87 ; ARM_RW_SB: movw r[[REG:[0-9]]], :lower16:a
88 ; ARM_RW_SB: movt r[[REG]], :upper16:a
89 ; ARM_RW_SB: str r0, [r9, r[[REG:[0-9]]]]
91 ; NO_MOVT_ARM_RW_SB: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
92 ; NO_MOVT_ARM_RW_SB: str r0, [r9, r[[REG]]]
94 ; THUMB2_RW_ABS: movw r[[REG:[0-9]]], :lower16:a
95 ; THUMB2_RW_ABS: movt r[[REG]], :upper16:a
96 ; THUMB2_RW_ABS: str r0, [r[[REG]]]
98 ; THUMB2_RW_SB: movw r[[REG:[0-9]]], :lower16:a(sbrel)
99 ; THUMB2_RW_SB: movt r[[REG]], :upper16:a(sbrel)
100 ; THUMB2_RW_SB: str.w r0, [r9, r[[REG]]]
102 ; NO_MOVT_THUMB2_RW_SB: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
103 ; NO_MOVT_THUMB2_RW_SB: str.w r0, [r9, r[[REG]]]
105 ; THUMB1_RW_ABS: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
106 ; THUMB1_RW_ABS: str r0, [r[[REG]]]
108 ; THUMB1_RW_SB: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
109 ; THUMB1_RW_SB: mov r[[REG_SB:[0-9]+]], r9
110 ; THUMB1_RW_SB: str r0, [r[[REG_SB]], r[[REG]]]
112 ; CHECK: {{(bx lr|pop)}}
114 ; NO_MOVT_ARM_RW_SB: [[LCPI]]
115 ; NO_MOVT_ARM_RW_SB: .long a(sbrel)
117 ; NO_MOVT_THUMB2_RW_SB: [[LCPI]]
118 ; NO_MOVT_THUMB2_RW_SB: .long a(sbrel)
120 ; THUMB1_RW_ABS: [[LCPI]]
121 ; THUMB1_RW_ABS-NEXT: .long a
123 ; THUMB1_RW_SB: [[LCPI]]
124 ; THUMB1_RW_SB: .long a(sbrel)
127 define i32 @read_const() {
129 %0 = load i32, i32* @b, align 4
131 ; CHECK-LABEL: read_const:
133 ; ARM_RO_ABS: movw r[[reg:[0-9]]], :lower16:b
134 ; ARM_RO_ABS: movt r[[reg]], :upper16:b
135 ; ARM_RO_ABS: ldr r0, [r[[reg]]]
137 ; NO_MOVT_ARM_RO_ABS: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
138 ; NO_MOVT_ARM_RO_ABS: ldr r0, [r[[REG]]]
140 ; ARM_RO_PC: movw r[[REG:[0-9]]], :lower16:(b-([[LPC:.LPC[0-9]+_[0-9]+]]+8))
141 ; ARM_RO_PC: movt r[[REG]], :upper16:(b-([[LPC]]+8))
142 ; ARM_RO_PC: [[LPC]]:
143 ; ARM_RO_PC-NEXT: ldr r0, [pc, r[[REG]]]
145 ; NO_MOVT_ARM_RO_PC: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
146 ; NO_MOVT_ARM_RO_PC: [[LPC:.LPC[0-9]+_[0-9]+]]:
147 ; NO_MOVT_ARM_RO_PC: ldr r0, [pc, r[[REG]]]
149 ; THUMB2_RO_ABS: movw r[[REG:[0-9]]], :lower16:b
150 ; THUMB2_RO_ABS: movt r[[REG]], :upper16:b
151 ; THUMB2_RO_ABS: ldr r0, [r[[REG]]]
153 ; NO_MOVT_THUMB2_RO_ABS: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
154 ; NO_MOVT_THUMB2_RO_ABS: ldr r0, [r[[REG]]]
156 ; THUMB2_RO_PC: movw r[[REG:[0-9]]], :lower16:(b-([[LPC:.LPC[0-9]+_[0-9]+]]+4))
157 ; THUMB2_RO_PC: movt r[[REG]], :upper16:(b-([[LPC]]+4))
158 ; THUMB2_RO_PC: [[LPC]]:
159 ; THUMB2_RO_PC-NEXT: add r[[REG]], pc
160 ; THUMB2_RO_PC: ldr r0, [r[[REG]]]
162 ; NO_MOVT_THUMB2_RO_PC: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
163 ; NO_MOVT_THUMB2_RO_PC: [[LPC:.LPC[0-9]+_[0-9]+]]:
164 ; NO_MOVT_THUMB2_RO_PC-NEXT: add r[[REG]], pc
165 ; NO_MOVT_THUMB2_RO_PC: ldr r0, [r[[REG]]]
168 ; THUMB1_RO_ABS: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
169 ; THUMB1_RO_ABS: ldr r0, [r[[REG]]]
171 ; THUMB1_RO_PC: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
172 ; THUMB1_RO_PC: [[LPC:.LPC[0-9]+_[0-9]+]]:
173 ; THUMB1_RO_PC-NEXT: add r[[REG]], pc
174 ; THUMB1_RO_PC: ldr r0, [r[[REG]]]
176 ; CHECK: {{(bx lr|pop)}}
178 ; NO_MOVT_ARM_RO_ABS: [[LCPI]]
179 ; NO_MOVT_ARM_RO_ABS-NEXT: .long b
181 ; NO_MOVT_THUMB2_RO_ABS: [[LCPI]]
182 ; NO_MOVT_THUMB2_RO_ABS-NEXT: .long b
184 ; THUMB1_RO_ABS: [[LCPI]]
185 ; THUMB1_RO_ABS-NEXT: .long b
187 ; NO_MOVT_ARM_RO_PC: [[LCPI]]
188 ; NO_MOVT_ARM_RO_PC-NEXT: .long b-([[LPC]]+8)
190 ; NO_MOVT_THUMB2_RO_PC: [[LCPI]]
191 ; NO_MOVT_THUMB2_RO_PC-NEXT: .long b-([[LPC]]+4)
193 ; THUMB1_RO_PC: [[LCPI]]
194 ; THUMB1_RO_PC-NEXT: .long b-([[LPC]]+4)
197 define i32* @take_addr() {
200 ; CHECK-LABEL: take_addr:
202 ; ARM_RW_ABS: movw r[[REG:[0-9]]], :lower16:a
203 ; ARM_RW_ABS: movt r[[REG]], :upper16:a
205 ; ARM_RW_SB: movw r[[REG:[0-9]]], :lower16:a(sbrel)
206 ; ARM_RW_SB: movt r[[REG]], :upper16:a(sbrel)
207 ; ARM_RW_SB: add r0, r9, r[[REG]]
209 ; NO_MOVT_ARM_RW_SB: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
210 ; NO_MOVT_ARM_RW_SB: add r0, r9, r[[REG]]
212 ; THUMB2_RW_ABS: movw r[[REG:[0-9]]], :lower16:a
213 ; THUMB2_RW_ABS: movt r[[REG]], :upper16:a
215 ; THUMB2_RW_SB: movw r[[REG:[0-9]]], :lower16:a(sbrel)
216 ; THUMB2_RW_SB: movt r[[REG]], :upper16:a(sbrel)
217 ; THUMB2_RW_SB: add r0, r9
219 ; NO_MOVT_THUMB2_RW_SB: ldr r0, [[LCPI:.LCPI[0-9]+_[0-9]+]]
220 ; NO_MOVT_THUMB2_RW_SB: add r0, r9
222 ; THUMB1_RW_ABS: ldr r0, [[LCPI:.LCPI[0-9]+_[0-9]+]]
224 ; THUMB1_RW_SB: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
225 ; THUMB1_RW_SB: mov r[[REG_SB:[0-9]+]], r9
226 ; THUMB1_RW_SB: adds r[[REG]], r[[REG_SB]], r[[REG]]
228 ; CHECK: {{(bx lr|pop)}}
230 ; NO_MOVT_ARM_RW_SB: [[LCPI]]
231 ; NO_MOVT_ARM_RW_SB: .long a(sbrel)
233 ; NO_MOVT_THUMB2_RW_SB: [[LCPI]]
234 ; NO_MOVT_THUMB2_RW_SB: .long a(sbrel)
236 ; THUMB1_RW_ABS: [[LCPI]]
237 ; THUMB1_RW_ABS-NEXT: .long a
239 ; THUMB1_RW_SB: [[LCPI]]
240 ; THUMB1_RW_SB: .long a(sbrel)
243 define i32* @take_addr_const() {
246 ; CHECK-LABEL: take_addr_const:
248 ; ARM_RO_ABS: movw r[[REG:[0-9]]], :lower16:b
249 ; ARM_RO_ABS: movt r[[REG]], :upper16:b
251 ; NO_MOVT_ARM_RO_ABS: ldr r0, [[LCPI:.LCPI[0-9]+_[0-9]+]]
253 ; ARM_RO_PC: movw r[[REG:[0-9]]], :lower16:(b-([[LPC:.LPC[0-9]+_[0-9]+]]+8))
254 ; ARM_RO_PC: movt r[[REG]], :upper16:(b-([[LPC]]+8))
255 ; ARM_RO_PC: [[LPC]]:
256 ; ARM_RO_PC-NEXT: add r0, pc, r[[REG:[0-9]]]
258 ; NO_MOVT_ARM_RO_PC: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
259 ; NO_MOVT_ARM_RO_PC: [[LPC:.LPC[0-9]+_[0-9]+]]:
260 ; NO_MOVT_ARM_RO_PC-NEXT: add r0, pc, r[[REG]]
262 ; THUMB2_RO_ABS: movw r[[REG:[0-9]]], :lower16:b
263 ; THUMB2_RO_ABS: movt r[[REG]], :upper16:b
265 ; NO_MOVT_THUMB2_RO_ABS: ldr r0, [[LCPI:.LCPI[0-9]+_[0-9]+]]
267 ; THUMB2_RO_PC: movw r0, :lower16:(b-([[LPC:.LPC[0-9]+_[0-9]+]]+4))
268 ; THUMB2_RO_PC: movt r0, :upper16:(b-([[LPC]]+4))
269 ; THUMB2_RO_PC: [[LPC]]:
270 ; THUMB2_RO_PC-NEXT: add r0, pc
272 ; NO_MOVT_THUMB2_RO_PC: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
273 ; NO_MOVT_THUMB2_RO_PC: [[LPC:.LPC[0-9]+_[0-9]+]]:
274 ; NO_MOVT_THUMB2_RO_PC-NEXT: add r[[REG]], pc
276 ; THUMB1_RO_ABS: ldr r0, [[LCPI:.LCPI[0-9]+_[0-9]+]]
278 ; THUMB1_RO_PC: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
279 ; THUMB1_RO_PC: [[LPC:.LPC[0-9]+_[0-9]+]]:
280 ; THUMB1_RO_PC-NEXT: add r[[REG]], pc
282 ; CHECK: {{(bx lr|pop)}}
284 ; NO_MOVT_ARM_RO_ABS: [[LCPI]]
285 ; NO_MOVT_ARM_RO_ABS-NEXT: .long b
287 ; NO_MOVT_THUMB2_RO_ABS: [[LCPI]]
288 ; NO_MOVT_THUMB2_RO_ABS-NEXT: .long b
290 ; THUMB1_RO_ABS: [[LCPI]]
291 ; THUMB1_RO_ABS-NEXT: .long b
293 ; NO_MOVT_ARM_RO_PC: [[LCPI]]
294 ; NO_MOVT_ARM_RO_PC-NEXT: .long b-([[LPC]]+8)
296 ; NO_MOVT_THUMB2_RO_PC: [[LCPI]]
297 ; NO_MOVT_THUMB2_RO_PC-NEXT: .long b-([[LPC]]+4)
299 ; THUMB1_RO_PC: [[LCPI]]
300 ; THUMB1_RO_PC-NEXT: .long b-([[LPC]]+4)
303 define i8* @take_addr_func() {
305 ret i8* bitcast (i8* ()* @take_addr_func to i8*)
306 ; CHECK-LABEL: take_addr_func:
308 ; ARM_RO_ABS: movw r[[REG:[0-9]]], :lower16:take_addr_func
309 ; ARM_RO_ABS: movt r[[REG]], :upper16:take_addr_func
311 ; NO_MOVT_ARM_RO_ABS: ldr r0, [[LCPI:.LCPI[0-9]+_[0-9]+]]
313 ; ARM_RO_PC: movw r[[REG:[0-9]]], :lower16:(take_addr_func-([[LPC:.LPC[0-9]+_[0-9]+]]+8))
314 ; ARM_RO_PC: movt r[[REG]], :upper16:(take_addr_func-([[LPC]]+8))
315 ; ARM_RO_PC: [[LPC]]:
316 ; ARM_RO_PC-NEXT: add r0, pc, r[[REG:[0-9]]]
318 ; NO_MOVT_ARM_RO_PC: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
319 ; NO_MOVT_ARM_RO_PC: [[LPC:.LPC[0-9]+_[0-9]+]]:
320 ; NO_MOVT_ARM_RO_PC-NEXT: add r0, pc, r[[REG]]
322 ; THUMB2_RO_ABS: movw r[[REG:[0-9]]], :lower16:take_addr_func
323 ; THUMB2_RO_ABS: movt r[[REG]], :upper16:take_addr_func
325 ; NO_MOVT_THUMB2_RO_ABS: ldr r0, [[LCPI:.LCPI[0-9]+_[0-9]+]]
327 ; THUMB2_RO_PC: movw r0, :lower16:(take_addr_func-([[LPC:.LPC[0-9]+_[0-9]+]]+4))
328 ; THUMB2_RO_PC: movt r0, :upper16:(take_addr_func-([[LPC]]+4))
329 ; THUMB2_RO_PC: [[LPC]]:
330 ; THUMB2_RO_PC-NEXT: add r0, pc
332 ; NO_MOVT_THUMB2_RO_PC: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
333 ; NO_MOVT_THUMB2_RO_PC: [[LPC:.LPC[0-9]+_[0-9]+]]:
334 ; NO_MOVT_THUMB2_RO_PC-NEXT: add r[[REG]], pc
336 ; THUMB1_RO_ABS: ldr r0, [[LCPI:.LCPI[0-9]+_[0-9]+]]
338 ; THUMB1_RO_PC: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
339 ; THUMB1_RO_PC: [[LPC:.LPC[0-9]+_[0-9]+]]:
340 ; THUMB1_RO_PC-NEXT: add r[[REG]], pc
342 ; CHECK: {{(bx lr|pop)}}
344 ; NO_MOVT_ARM_RO_ABS: [[LCPI]]
345 ; NO_MOVT_ARM_RO_ABS-NEXT: .long take_addr_func
347 ; NO_MOVT_THUMB2_RO_ABS: [[LCPI]]
348 ; NO_MOVT_THUMB2_RO_ABS-NEXT: .long take_addr_func
350 ; THUMB1_RO_ABS: [[LCPI]]
351 ; THUMB1_RO_ABS-NEXT: .long take_addr_func
353 ; NO_MOVT_ARM_RO_PC: [[LCPI]]
354 ; NO_MOVT_ARM_RO_PC-NEXT: .long take_addr_func-([[LPC]]+8)
356 ; NO_MOVT_THUMB2_RO_PC: [[LCPI]]
357 ; NO_MOVT_THUMB2_RO_PC-NEXT: .long take_addr_func-([[LPC]]+4)
359 ; THUMB1_RO_PC: [[LCPI]]
360 ; THUMB1_RO_PC-NEXT: .long take_addr_func-([[LPC]]+4)
363 define i8* @block_addr() {
368 ret i8* blockaddress(@block_addr, %lab1)
370 ; CHECK-LABEL: block_addr:
372 ; ARM_RO_ABS: [[LTMP:.Ltmp[0-9]+]]:
373 ; ARM_RO_ABS: ldr r0, [[LCPI:.LCPI[0-9]+_[0-9]+]]
375 ; ARM_RO_PC: [[LTMP:.Ltmp[0-9]+]]:
376 ; ARM_RO_PC: ldr r[[REG:[0-9]]], [[LCPI:.LCPI[0-9]+_[0-9]+]]
377 ; ARM_RO_PC: [[LPC:.LPC[0-9]+_[0-9]+]]:
378 ; ARM_RO_PC: add r0, pc, r[[REG]]
380 ; THUMB2_RO_ABS: [[LTMP:.Ltmp[0-9]+]]:
381 ; THUMB2_RO_ABS: ldr r0, [[LCPI:.LCPI[0-9]+_[0-9]+]]
383 ; THUMB2_RO_PC: [[LTMP:.Ltmp[0-9]+]]:
384 ; THUMB2_RO_PC: ldr r0, [[LCPI:.LCPI[0-9]+_[0-9]+]]
385 ; THUMB2_RO_PC: [[LPC:.LPC[0-9]+_[0-9]+]]:
386 ; THUMB2_RO_PC: add r0, pc
388 ; THUMB1_RO_ABS: [[LTMP:.Ltmp[0-9]+]]:
389 ; THUMB1_RO_ABS: ldr r0, [[LCPI:.LCPI[0-9]+_[0-9]+]]
391 ; THUMB1_RO_PC: [[LTMP:.Ltmp[0-9]+]]:
392 ; THUMB1_RO_PC: ldr r0, [[LCPI:.LCPI[0-9]+_[0-9]+]]
393 ; THUMB1_RO_PC: [[LPC:.LPC[0-9]+_[0-9]+]]:
394 ; THUMB1_RO_PC: add r0, pc
398 ; ARM_RO_ABS: [[LCPI]]
399 ; ARM_RO_ABS-NEXT: .long [[LTMP]]
401 ; ARM_RO_PC: [[LCPI]]
402 ; ARM_RO_PC-NEXT: .long [[LTMP]]-([[LPC]]+8)
404 ; THUMB2_RO_ABS: [[LCPI]]
405 ; THUMB2_RO_ABS-NEXT: .long [[LTMP]]
407 ; THUMB2_RO_PC: [[LCPI]]
408 ; THUMB2_RO_PC-NEXT: .long [[LTMP]]-([[LPC]]+4)
410 ; THUMB1_RO_ABS: [[LCPI]]
411 ; THUMB1_RO_ABS-NEXT: .long [[LTMP]]
413 ; THUMB1_RO_PC: [[LCPI]]
414 ; THUMB1_RO_PC-NEXT: .long [[LTMP]]-([[LPC]]+4)