1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
2// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+streaming-sve < %s \
4// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
5// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
6// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
7// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
8// RUN:        | llvm-objdump -d --mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
9// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
10// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
11
12mla z0.h, z1.h, z7.h[7]
13// CHECK-INST: mla	z0.h, z1.h, z7.h[7]
14// CHECK-ENCODING: [0x20,0x08,0x7f,0x44]
15// CHECK-ERROR: instruction requires: streaming-sve or sve2
16// CHECK-UNKNOWN: 20 08 7f 44 <unknown>
17
18mla z0.s, z1.s, z7.s[3]
19// CHECK-INST: mla	z0.s, z1.s, z7.s[3]
20// CHECK-ENCODING: [0x20,0x08,0xbf,0x44]
21// CHECK-ERROR: instruction requires: streaming-sve or sve2
22// CHECK-UNKNOWN: 20 08 bf 44 <unknown>
23
24mla z0.d, z1.d, z7.d[1]
25// CHECK-INST: mla	z0.d, z1.d, z7.d[1]
26// CHECK-ENCODING: [0x20,0x08,0xf7,0x44]
27// CHECK-ERROR: instruction requires: streaming-sve or sve2
28// CHECK-UNKNOWN: 20 08 f7 44 <unknown>
29
30
31// --------------------------------------------------------------------------//
32// Test compatibility with MOVPRFX instruction.
33
34movprfx z0, z7
35// CHECK-INST: movprfx	z0, z7
36// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
37// CHECK-ERROR: instruction requires: streaming-sve or sve
38// CHECK-UNKNOWN: e0 bc 20 04 <unknown>
39
40mla z0.d, z1.d, z7.d[1]
41// CHECK-INST: mla	z0.d, z1.d, z7.d[1]
42// CHECK-ENCODING: [0x20,0x08,0xf7,0x44]
43// CHECK-ERROR: instruction requires: streaming-sve or sve2
44// CHECK-UNKNOWN: 20 08 f7 44 <unknown>
45