Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / AArch64 / SME / str.s
blob36e60286b95611371039b07bf4037a15fbecb4bf
1 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \
2 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
4 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
5 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme < %s \
6 // RUN: | llvm-objdump --no-print-imm-hex -d --mattr=+sme - | FileCheck %s --check-prefix=CHECK-INST
7 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme < %s \
8 // RUN: | llvm-objdump --no-print-imm-hex -d --mattr=-sme - | FileCheck %s --check-prefix=CHECK-UNKNOWN
9 // Disassemble encoding and check the re-encoding (-show-encoding) matches.
10 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \
11 // RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
12 // RUN: | llvm-mc -triple=aarch64 -mattr=+sme -disassemble -show-encoding \
13 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
15 str za[w12, 0], [x0]
16 // CHECK-INST: str za[w12, 0], [x0]
17 // CHECK-ENCODING: [0x00,0x00,0x20,0xe1]
18 // CHECK-ERROR: instruction requires: sme
19 // CHECK-UNKNOWN: e1200000 <unknown>
21 str za[w14, 5], [x10, #5, mul vl]
22 // CHECK-INST: str za[w14, 5], [x10, #5, mul vl]
23 // CHECK-ENCODING: [0x45,0x41,0x20,0xe1]
24 // CHECK-ERROR: instruction requires: sme
25 // CHECK-UNKNOWN: e1204145 <unknown>
27 str za[w15, 7], [x13, #7, mul vl]
28 // CHECK-INST: str za[w15, 7], [x13, #7, mul vl]
29 // CHECK-ENCODING: [0xa7,0x61,0x20,0xe1]
30 // CHECK-ERROR: instruction requires: sme
31 // CHECK-UNKNOWN: e12061a7 <unknown>
33 str za[w15, 15], [sp, #15, mul vl]
34 // CHECK-INST: str za[w15, 15], [sp, #15, mul vl]
35 // CHECK-ENCODING: [0xef,0x63,0x20,0xe1]
36 // CHECK-ERROR: instruction requires: sme
37 // CHECK-UNKNOWN: e12063ef <unknown>
39 str za[w12, 5], [x17, #5, mul vl]
40 // CHECK-INST: str za[w12, 5], [x17, #5, mul vl]
41 // CHECK-ENCODING: [0x25,0x02,0x20,0xe1]
42 // CHECK-ERROR: instruction requires: sme
43 // CHECK-UNKNOWN: e1200225 <unknown>
45 str za[w12, 1], [x1, #1, mul vl]
46 // CHECK-INST: str za[w12, 1], [x1, #1, mul vl]
47 // CHECK-ENCODING: [0x21,0x00,0x20,0xe1]
48 // CHECK-ERROR: instruction requires: sme
49 // CHECK-UNKNOWN: e1200021 <unknown>
51 str za[w14, 8], [x19, #8, mul vl]
52 // CHECK-INST: str za[w14, 8], [x19, #8, mul vl]
53 // CHECK-ENCODING: [0x68,0x42,0x20,0xe1]
54 // CHECK-ERROR: instruction requires: sme
55 // CHECK-UNKNOWN: e1204268 <unknown>
57 str za[w12, 0], [x12]
58 // CHECK-INST: str za[w12, 0], [x12]
59 // CHECK-ENCODING: [0x80,0x01,0x20,0xe1]
60 // CHECK-ERROR: instruction requires: sme
61 // CHECK-UNKNOWN: e1200180 <unknown>
63 str za[w14, 1], [x1, #1, mul vl]
64 // CHECK-INST: str za[w14, 1], [x1, #1, mul vl]
65 // CHECK-ENCODING: [0x21,0x40,0x20,0xe1]
66 // CHECK-ERROR: instruction requires: sme
67 // CHECK-UNKNOWN: e1204021 <unknown>
69 str za[w12, 13], [x22, #13, mul vl]
70 // CHECK-INST: str za[w12, 13], [x22, #13, mul vl]
71 // CHECK-ENCODING: [0xcd,0x02,0x20,0xe1]
72 // CHECK-ERROR: instruction requires: sme
73 // CHECK-UNKNOWN: e12002cd <unknown>
75 str za[w15, 2], [x9, #2, mul vl]
76 // CHECK-INST: str za[w15, 2], [x9, #2, mul vl]
77 // CHECK-ENCODING: [0x22,0x61,0x20,0xe1]
78 // CHECK-ERROR: instruction requires: sme
79 // CHECK-UNKNOWN: e1206122 <unknown>
81 str za[w13, 7], [x12, #7, mul vl]
82 // CHECK-INST: str za[w13, 7], [x12, #7, mul vl]
83 // CHECK-ENCODING: [0x87,0x21,0x20,0xe1]
84 // CHECK-ERROR: instruction requires: sme
85 // CHECK-UNKNOWN: e1202187 <unknown>