Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / AVR / inst-ld.s
blobad3f8fd62616bd4ad9eb142639ed409af8036aba
1 ; RUN: llvm-mc -triple avr -mattr=sram -show-encoding < %s | FileCheck %s
2 ; RUN: llvm-mc -filetype=obj -triple avr -mattr=sram < %s \
3 ; RUN: | llvm-objdump -d --mattr=sram - | FileCheck --check-prefix=INST %s
6 foo:
8 ; Normal
10 ld r10, X
11 ld r17, X
13 ld r30, Y
14 ld r19, Y
16 ld r10, Z
17 ld r2, Z
19 ; Postincremenet
21 ld r10, X+
22 ld r17, X+
24 ld r30, Y+
25 ld r19, Y+
27 ld r10, Z+
28 ld r2, Z+
30 ; Predecrement
32 ld r10, -X
33 ld r17, -X
35 ld r30, -Y
36 ld r19, -Y
38 ld r10, -Z
39 ld r2, -Z
42 ; Normal
44 ; CHECK: ld r10, X ; encoding: [0xac,0x90]
45 ; CHECK: ld r17, X ; encoding: [0x1c,0x91]
47 ; CHECK: ld r30, Y ; encoding: [0xe8,0x81]
48 ; CHECK: ld r19, Y ; encoding: [0x38,0x81]
50 ; CHECK: ld r10, Z ; encoding: [0xa0,0x80]
51 ; CHECK: ld r2, Z ; encoding: [0x20,0x80]
54 ; Postincrement
56 ; CHECK: ld r10, X+ ; encoding: [0xad,0x90]
57 ; CHECK: ld r17, X+ ; encoding: [0x1d,0x91]
59 ; CHECK: ld r30, Y+ ; encoding: [0xe9,0x91]
60 ; CHECK: ld r19, Y+ ; encoding: [0x39,0x91]
62 ; CHECK: ld r10, Z+ ; encoding: [0xa1,0x90]
63 ; CHECK: ld r2, Z+ ; encoding: [0x21,0x90]
66 ; Predecrement
68 ; CHECK: ld r10, -X ; encoding: [0xae,0x90]
69 ; CHECK: ld r17, -X ; encoding: [0x1e,0x91]
71 ; CHECK: ld r30, -Y ; encoding: [0xea,0x91]
72 ; CHECK: ld r19, -Y ; encoding: [0x3a,0x91]
74 ; CHECK: ld r10, -Z ; encoding: [0xa2,0x90]
75 ; CHECK: ld r2, -Z ; encoding: [0x22,0x90]
77 ; INST: ld r10, X
78 ; INST: ld r17, X
79 ; INST: ldd r30, Y+0
80 ; INST: ldd r19, Y+0
81 ; INST: ldd r10, Z+0
82 ; INST: ldd r2, Z+0
84 ; INST: ld r10, X+
85 ; INST: ld r17, X+
86 ; INST: ld r30, Y+
87 ; INST: ld r19, Y+
88 ; INST: ld r10, Z+
89 ; INST: ld r2, Z+
91 ; INST: ld r10, -X
92 ; INST: ld r17, -X
93 ; INST: ld r30, -Y
94 ; INST: ld r19, -Y
95 ; INST: ld r10, -Z
96 ; INST: ld r2, -Z