[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / ARM / macho-word-reloc-thumb.s
blobbd98f6b33f974bbb56dad8be1b08d225fb77bdbf
1 @ RUN: llvm-mc -triple thumbv7-apple-ios %s -filetype=obj -o %t
2 @ RUN: llvm-objdump --macho -d %t --triple=thumbv7-apple-ios | FileCheck %s
4 @ ARM relocatable object files try to look like they're pre-linked, so the
5 @ offsets in the instructions are a best-guess. I suspect the "-3" should b
7 @ CHECK: movw r1, :lower16:((_bar-8)-3)
8 @ [...]
9 @ CHECK: .long {{[0-9]*[13579]}}
11 .thumb
12 .thumb_func _foo
13 _foo:
14 movw r1, :lower16:(_bar-(LPC2_0+4))
15 movt r1, :upper16:(_bar-(LPC2_0+4))
16 LPC2_0:
17 add r1, pc
18 ldr r0, Lconstpool
19 bx lr
20 Lconstpool:
21 .data_region
22 .word _bar
23 .end_data_region
25 .thumb_func _bar
26 .global _bar
27 _bar:
28 bx lr
30 .subsections_via_symbols