xref: /llvm-project/llvm/test/MC/AArch64/SVE/lslr.s (revision ae16b2ed9871b5624fdcb4286fbd0d6ddfd88961)
1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
2// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %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=+sve < %s \
8// RUN:        | llvm-objdump -d --mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
9// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
10// RUN:   | llvm-objdump -d --mattr=-sve - | FileCheck %s --check-prefix=CHECK-UNKNOWN
11
12lslr    z0.b, p0/m, z0.b, z0.b
13// CHECK-INST: lslr	z0.b, p0/m, z0.b, z0.b
14// CHECK-ENCODING: [0x00,0x80,0x17,0x04]
15// CHECK-ERROR: instruction requires: sve or sme
16// CHECK-UNKNOWN: 04178000 <unknown>
17
18lslr    z0.h, p0/m, z0.h, z0.h
19// CHECK-INST: lslr	z0.h, p0/m, z0.h, z0.h
20// CHECK-ENCODING: [0x00,0x80,0x57,0x04]
21// CHECK-ERROR: instruction requires: sve or sme
22// CHECK-UNKNOWN: 04578000 <unknown>
23
24lslr    z0.s, p0/m, z0.s, z0.s
25// CHECK-INST: lslr	z0.s, p0/m, z0.s, z0.s
26// CHECK-ENCODING: [0x00,0x80,0x97,0x04]
27// CHECK-ERROR: instruction requires: sve or sme
28// CHECK-UNKNOWN: 04978000 <unknown>
29
30lslr    z0.d, p0/m, z0.d, z0.d
31// CHECK-INST: lslr	z0.d, p0/m, z0.d, z0.d
32// CHECK-ENCODING: [0x00,0x80,0xd7,0x04]
33// CHECK-ERROR: instruction requires: sve or sme
34// CHECK-UNKNOWN: 04d78000 <unknown>
35
36
37// --------------------------------------------------------------------------//
38// Test compatibility with MOVPRFX instruction.
39
40movprfx z5.d, p0/z, z7.d
41// CHECK-INST: movprfx	z5.d, p0/z, z7.d
42// CHECK-ENCODING: [0xe5,0x20,0xd0,0x04]
43// CHECK-ERROR: instruction requires: sve or sme
44// CHECK-UNKNOWN: 04d020e5 <unknown>
45
46lslr    z5.d, p0/m, z5.d, z0.d
47// CHECK-INST: lslr	z5.d, p0/m, z5.d, z0.d
48// CHECK-ENCODING: [0x05,0x80,0xd7,0x04]
49// CHECK-ERROR: instruction requires: sve or sme
50// CHECK-UNKNOWN: 04d78005 <unknown>
51
52movprfx z5, z7
53// CHECK-INST: movprfx	z5, z7
54// CHECK-ENCODING: [0xe5,0xbc,0x20,0x04]
55// CHECK-ERROR: instruction requires: sve or sme
56// CHECK-UNKNOWN: 0420bce5 <unknown>
57
58lslr    z5.d, p0/m, z5.d, z0.d
59// CHECK-INST: lslr	z5.d, p0/m, z5.d, z0.d
60// CHECK-ENCODING: [0x05,0x80,0xd7,0x04]
61// CHECK-ERROR: instruction requires: sve or sme
62// CHECK-UNKNOWN: 04d78005 <unknown>
63