Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / ARM / thumb2-cbn-to-next-inst.s
bloba8deec71c163c4149e8704feca5ddcd5fd1dc5f0
1 @ RUN: llvm-mc -triple thumbv7-apple-darwin -filetype=obj -o %t.o %s
2 @ RUN: llvm-objdump --no-print-imm-hex --triple=thumbv7-apple-darwin -d %t.o | FileCheck %s
4 .thumb
5 start:
6 .thumb_func start
7 add r1, r2, r3
8 cbnz r2, L1 @ this can't be encoded, must turn into a nop
9 L1:
10 add r4, r5, r6
11 cbnz r2, L2
12 sub r7, r8, r9
13 L2:
14 add r7, r8, r9
15 cbz r2, L3 @ this can't be encoded, must turn into a nop
16 L3:
17 add r10, r11, r12
18 cbz r2, L4
19 sub r7, r8, r9
20 L4:
21 add r3, r4, r5
23 @ CHECK: 0: eb02 0103 add.w r1, r2, r3
24 @ CHECK: 4: bf00 nop
25 @ CHECK: 6: eb05 0406 add.w r4, r5, r6
26 @ CHECK: a: b90a cbnz r2, 0x10 <start+0x10> @ imm = #2
27 @ CHECK: c: eba8 0709 sub.w r7, r8, r9
28 @ CHECK: 10: eb08 0709 add.w r7, r8, r9
29 @ CHECK: 14: bf00 nop
30 @ CHECK: 16: eb0b 0a0c add.w r10, r11, r12
31 @ CHECK: 1a: b10a cbz r2, 0x20 <start+0x20> @ imm = #2
32 @ CHECK: 1c: eba8 0709 sub.w r7, r8, r9
33 @ CHECK: 20: eb04 0305 add.w r3, r4, r5