Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / ARM / misaligned-blx.s
blob0a178d8c625ec4bf5c6d9375e7f0306fd6f7a239
1 @ RUN: not llvm-mc -triple thumbv7-apple-ios -filetype=obj %s -o /dev/null 2>&1 | FileCheck %s
2 @ Size: 2 bytes
3 .thumb_func _f1
4 .thumb
5 .globl _f1
6 _f1:
7 bx lr
9 @ A misaligned ARM destination.
10 .arm
11 .byte 0x0
12 .globl _misaligned
13 _misaligned:
14 bx lr
16 @ And a properly aligned one.
17 .globl _aligned
18 .p2align 2
19 .arm
20 _aligned:
21 bx lr
23 @ Align this Thumb function so we can predict the outcome of
24 @ "Align(PC, 4)" during blx operation.
25 .thumb_func _test
26 .thumb
27 .p2align 2
28 .globl _test
29 _test:
30 blx _misaligned @ PC=0 (mod 4)
31 movs r0, r0
32 blx _misaligned @ PC=2 (mod 4)
33 movs r0, r0
34 blx _aligned @ PC=0 (mod 4)
35 movs r0, r0
36 blx _aligned @ PC=2 (mod 4)
38 @ CHECK: error: misaligned ARM call destination
39 @ CHECK: blx _misaligned
40 @ CHECK: error: misaligned ARM call destination
41 @ CHECK: blx _misaligned