• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
10cdot  z0.s, z1.b, z31.b, #0
11// CHECK-INST: cdot	z0.s, z1.b, z31.b, #0
12// CHECK-ENCODING: [0x20,0x10,0x9f,0x44]
13// CHECK-ERROR: instruction requires: sve2
14// CHECK-UNKNOWN: 20 10 9f 44 <unknown>
15
16cdot  z0.d, z1.h, z31.h, #0
17// CHECK-INST: cdot	z0.d, z1.h, z31.h, #0
18// CHECK-ENCODING: [0x20,0x10,0xdf,0x44]
19// CHECK-ERROR: instruction requires: sve2
20// CHECK-UNKNOWN: 20 10 df 44 <unknown>
21
22cdot  z0.d, z1.h, z31.h, #90
23// CHECK-INST: cdot	z0.d, z1.h, z31.h, #90
24// CHECK-ENCODING: [0x20,0x14,0xdf,0x44]
25// CHECK-ERROR: instruction requires: sve2
26// CHECK-UNKNOWN: 20 14 df 44 <unknown>
27
28cdot  z0.d, z1.h, z31.h, #180
29// CHECK-INST: cdot	z0.d, z1.h, z31.h, #180
30// CHECK-ENCODING: [0x20,0x18,0xdf,0x44]
31// CHECK-ERROR: instruction requires: sve2
32// CHECK-UNKNOWN: 20 18 df 44 <unknown>
33
34cdot  z0.d, z1.h, z31.h, #270
35// CHECK-INST: cdot	z0.d, z1.h, z31.h, #270
36// CHECK-ENCODING: [0x20,0x1c,0xdf,0x44]
37// CHECK-ERROR: instruction requires: sve2
38// CHECK-UNKNOWN: 20 1c df 44 <unknown>
39
40cdot  z0.s, z1.b, z7.b[3], #0
41// CHECK-INST: cdot	z0.s, z1.b, z7.b[3], #0
42// CHECK-ENCODING: [0x20,0x40,0xbf,0x44]
43// CHECK-ERROR: instruction requires: sve2
44// CHECK-UNKNOWN: 20 40 bf 44 <unknown>
45
46cdot  z0.d, z1.h, z15.h[1], #0
47// CHECK-INST: cdot	z0.d, z1.h, z15.h[1], #0
48// CHECK-ENCODING: [0x20,0x40,0xff,0x44]
49// CHECK-ERROR: instruction requires: sve2
50// CHECK-UNKNOWN: 20 40 ff 44 <unknown>
51
52cdot  z5.d, z6.h, z3.h[0], #90
53// CHECK-INST: cdot	z5.d, z6.h, z3.h[0], #90
54// CHECK-ENCODING: [0xc5,0x44,0xe3,0x44]
55// CHECK-ERROR: instruction requires: sve2
56// CHECK-UNKNOWN: c5 44 e3 44 <unknown>
57
58cdot  z29.d, z30.h, z0.h[0], #180
59// CHECK-INST: cdot z29.d, z30.h, z0.h[0], #180
60// CHECK-ENCODING: [0xdd,0x4b,0xe0,0x44]
61// CHECK-ERROR: instruction requires: sve2
62// CHECK-UNKNOWN: dd 4b e0 44 <unknown>
63
64cdot  z31.d, z30.h, z7.h[1], #270
65// CHECK-INST: cdot z31.d, z30.h, z7.h[1], #270
66// CHECK-ENCODING: [0xdf,0x4f,0xf7,0x44]
67// CHECK-ERROR: instruction requires: sve2
68// CHECK-UNKNOWN: df 4f f7 44 <unknown>
69
70
71// --------------------------------------------------------------------------//
72// Test compatibility with MOVPRFX instruction.
73
74movprfx z0, z7
75// CHECK-INST: movprfx	z0, z7
76// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
77// CHECK-ERROR: instruction requires: sve
78// CHECK-UNKNOWN: e0 bc 20 04 <unknown>
79
80cdot  z0.d, z1.h, z31.h, #0
81// CHECK-INST: cdot	z0.d, z1.h, z31.h, #0
82// CHECK-ENCODING: [0x20,0x10,0xdf,0x44]
83// CHECK-ERROR: instruction requires: sve2
84// CHECK-UNKNOWN: 20 10 df 44 <unknown>
85
86movprfx z0, z7
87// CHECK-INST: movprfx	z0, z7
88// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]
89// CHECK-ERROR: instruction requires: sve
90// CHECK-UNKNOWN: e0 bc 20 04 <unknown>
91
92cdot  z0.d, z1.h, z15.h[1], #0
93// CHECK-INST: cdot z0.d, z1.h, z15.h[1], #0
94// CHECK-ENCODING: [0x20,0x40,0xff,0x44]
95// CHECK-ERROR: instruction requires: sve2
96// CHECK-UNKNOWN: 20 40 ff 44 <unknown>
97