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
11fmlslb z29.s, z30.h, z31.h
12// CHECK-INST: fmlslb z29.s, z30.h, z31.h
13// CHECK-ENCODING: [0xdd,0xa3,0xbf,0x64]
14// CHECK-ERROR: instruction requires: sve2
15// CHECK-UNKNOWN: dd a3 bf 64 <unknown>
16
17fmlslb z0.s, z1.h, z7.h[0]
18// CHECK-INST: fmlslb	z0.s, z1.h, z7.h[0]
19// CHECK-ENCODING: [0x20,0x60,0xa7,0x64]
20// CHECK-ERROR: instruction requires: sve2
21// CHECK-UNKNOWN: 20 60 a7 64 <unknown>
22
23fmlslb z30.s, z31.h, z7.h[7]
24// CHECK-INST: fmlslb z30.s, z31.h, z7.h[7]
25// CHECK-ENCODING: [0xfe,0x6b,0xbf,0x64]
26// CHECK-ERROR: instruction requires: sve2
27// CHECK-UNKNOWN: fe 6b 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
38fmlslb z29.s, z30.h, z31.h
39// CHECK-INST: fmlslb z29.s, z30.h, z31.h
40// CHECK-ENCODING: [0xdd,0xa3,0xbf,0x64]
41// CHECK-ERROR: instruction requires: sve2
42// CHECK-UNKNOWN: dd a3 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
50fmlslb z21.s, z1.h, z7.h[7]
51// CHECK-INST: fmlslb	z21.s, z1.h, z7.h[7]
52// CHECK-ENCODING: [0x35,0x68,0xbf,0x64]
53// CHECK-ERROR: instruction requires: sve2
54// CHECK-UNKNOWN: 35 68 bf 64 <unknown>
55