Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / ARM / thumb-8-bit-relocs.s
blobcd13df98223badcf5f49373612444642cf50d93f
1 @ RUN: llvm-mc -triple thumbv6m-eabi -o - %s | FileCheck %s
2 @ RUN: llvm-mc -triple thumbv6m-eabi -filetype obj -o - %s | llvm-readobj -r - \
3 @ RUN: | FileCheck -check-prefix CHECK-RELOCATIONS %s
4 @ RUN: llvm-mc -triple thumbv7m-eabi -o - %s | FileCheck %s
5 @ RUN: llvm-mc -triple thumbv7m-eabi -filetype obj -o - %s | llvm-readobj -r - \
6 @ RUN: | FileCheck -check-prefix CHECK-RELOCATIONS %s
8 .syntax unified
10 .type function,%function
11 function:
12 bx lr
14 .global external
15 .type external,%function
17 .type test,%function
18 test:
19 movs r3, :upper8_15:function
20 adds r3, :upper0_7:function
21 adds r3, :lower8_15:function
22 adds r3, :lower0_7:function
24 @ CHECK-LABEL: test:
25 @ CHECK: movs r3, :upper8_15:function
26 @ CHECK: adds r3, :upper0_7:function
27 @ CHECK: adds r3, :lower8_15:function
28 @ CHECK: adds r3, :lower0_7:function
30 @ CHECK-RELOCATIONS: Relocations [
31 @ CHECK-RELOCATIONS: 0x2 R_ARM_THM_ALU_ABS_G3 function
32 @ CHECK-RELOCATIONS-NEXT: 0x4 R_ARM_THM_ALU_ABS_G2_NC function
33 @ CHECK-RELOCATIONS-NEXT: 0x6 R_ARM_THM_ALU_ABS_G1_NC function
34 @ CHECK-RELOCATIONS-NEXT: 0x8 R_ARM_THM_ALU_ABS_G0_NC function
35 @ CHECK-RELOCATIONS: ]