Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / ARM / subtarget-nop.s
blob984a70b6bfb90f377804f66e30c649da60828ca6
1 // RUN: llvm-mc %s --triple=arm-linux-gnueabihf -filetype=obj | llvm-objdump --no-show-raw-insn --triple=armv7 -d - | FileCheck %s
3 // Check that the architectural nop is only produced for subtargets that
4 // support it. This includes nop padding for alignment.
5 .syntax unified
6 .arch armv6
7 foo:
8 mov r1, r0
9 nop
10 .p2align 4
11 bx lr
13 .arch armv7-a
14 bar:
15 mov r1, r0
16 nop
17 .p2align 4
18 bx lr
20 .arch armv4t
21 baz:
22 mov r1, r0
23 nop
24 .p2align 4
25 bx lr
27 // CHECK: 00000000 <foo>:
28 // CHECK-NEXT: 0: mov r1, r0
29 // CHECK-NEXT: 4: mov r0, r0
30 // CHECK-NEXT: 8: mov r0, r0
31 // CHECK-NEXT: c: mov r0, r0
32 // CHECK-NEXT: 10: bx lr
34 // CHECK: 00000014 <bar>:
35 // CHECK-NEXT: 14: mov r1, r0
36 // CHECK-NEXT: 18: nop
37 // CHECK-NEXT: 1c: nop
38 // CHECK-NEXT: 20: bx lr
40 // CHECK: 00000024 <baz>:
41 // CHECK-NEXT: 24: mov r1, r0
42 // CHECK-NEXT: 28: mov r0, r0
43 // CHECK-NEXT: 2c: mov r0, r0
44 // CHECK-NEXT: 30: bx lr