1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %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=+sve2 < %s \
6// RUN:        | llvm-objdump -d --mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
7// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
8// RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
9
10
11fmlalt z29.s, z30.h, z31.h
12// CHECK-INST: fmlalt z29.s, z30.h, z31.h
13// CHECK-ENCODING: [0xdd,0x87,0xbf,0x64]
14// CHECK-ERROR: instruction requires: sve2
15// CHECK-UNKNOWN: dd 87 bf 64 <unknown>
16
17fmlalt z0.s, z1.h, z7.h[0]
18// CHECK-INST: fmlalt	z0.s, z1.h, z7.h[0]
19// CHECK-ENCODING: [0x20,0x44,0xa7,0x64]
20// CHECK-ERROR: instruction requires: sve2
21// CHECK-UNKNOWN: 20 44 a7 64 <unknown>
22
23fmlalt z30.s, z31.h, z7.h[7]
24// CHECK-INST: fmlalt z30.s, z31.h, z7.h[7]
25// CHECK-ENCODING: [0xfe,0x4f,0xbf,0x64]
26// CHECK-ERROR: instruction requires: sve2
27// CHECK-UNKNOWN: fe 4f bf 64 <unknown>
28
29// --------------------------------------------------------------------------//
30// Test compatibility with MOVPRFX instruction.
31
32movprfx z29, z28
33// CHECK-INST: movprfx	z29, z28
34// CHECK-ENCODING: [0x9d,0xbf,0x20,0x04]
35// CHECK-ERROR: instruction requires: sve
36// CHECK-UNKNOWN: 9d bf 20 04 <unknown>
37
38fmlalt z29.s, z30.h, z31.h
39// CHECK-INST: fmlalt z29.s, z30.h, z31.h
40// CHECK-ENCODING: [0xdd,0x87,0xbf,0x64]
41// CHECK-ERROR: instruction requires: sve2
42// CHECK-UNKNOWN: dd 87 bf 64 <unknown>
43
44movprfx z21, z28
45// CHECK-INST: movprfx	z21, z28
46// CHECK-ENCODING: [0x95,0xbf,0x20,0x04]
47// CHECK-ERROR: instruction requires: sve
48// CHECK-UNKNOWN: 95 bf 20 04 <unknown>
49
50fmlalt z21.s, z1.h, z7.h[7]
51// CHECK-INST: fmlalt	z21.s, z1.h, z7.h[7]
52// CHECK-ENCODING: [0x35,0x4c,0xbf,0x64]
53// CHECK-ERROR: instruction requires: sve2
54// CHECK-UNKNOWN: 35 4c bf 64 <unknown>
55