1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \ 2// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST 3// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2p1 < %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=+sme2 < %s \ 8// RUN: | llvm-objdump -d --mattr=+sme2 - | FileCheck %s --check-prefix=CHECK-INST 9// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \ 10// RUN: | llvm-objdump -d --mattr=-sme2,-sve2p1 - | FileCheck %s --check-prefix=CHECK-UNKNOWN 11// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \ 12// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ 13// RUN: | llvm-mc -triple=aarch64 -mattr=+sme2 -disassemble -show-encoding \ 14// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST 15 16whilege pn8.h, x0, x0, vlx2 // 00100101-01100000-01000000-00010000 17// CHECK-INST: whilege pn8.h, x0, x0, vlx2 18// CHECK-ENCODING: [0x10,0x40,0x60,0x25] 19// CHECK-ERROR: instruction requires: sme2 or sve2p1 20// CHECK-UNKNOWN: 25604010 <unknown> 21 22whilege pn13.h, x10, x21, vlx2 // 00100101-01110101-01000001-01010101 23// CHECK-INST: whilege pn13.h, x10, x21, vlx2 24// CHECK-ENCODING: [0x55,0x41,0x75,0x25] 25// CHECK-ERROR: instruction requires: sme2 or sve2p1 26// CHECK-UNKNOWN: 25754155 <unknown> 27 28whilege pn15.h, x13, x8, vlx4 // 00100101-01101000-01100001-10110111 29// CHECK-INST: whilege pn15.h, x13, x8, vlx4 30// CHECK-ENCODING: [0xb7,0x61,0x68,0x25] 31// CHECK-ERROR: instruction requires: sme2 or sve2p1 32// CHECK-UNKNOWN: 256861b7 <unknown> 33 34whilege pn15.h, xzr, xzr, vlx4 // 00100101-01111111-01100011-11110111 35// CHECK-INST: whilege pn15.h, xzr, xzr, vlx4 36// CHECK-ENCODING: [0xf7,0x63,0x7f,0x25] 37// CHECK-ERROR: instruction requires: sme2 or sve2p1 38// CHECK-UNKNOWN: 257f63f7 <unknown> 39 40whilege {p0.h, p1.h}, x0, x0 // 00100101-01100000-01010000-00010000 41// CHECK-INST: whilege { p0.h, p1.h }, x0, x0 42// CHECK-ENCODING: [0x10,0x50,0x60,0x25] 43// CHECK-ERROR: instruction requires: sme2 or sve2p1 44// CHECK-UNKNOWN: 25605010 <unknown> 45 46whilege {p4.h, p5.h}, x10, x21 // 00100101-01110101-01010001-01010100 47// CHECK-INST: whilege { p4.h, p5.h }, x10, x21 48// CHECK-ENCODING: [0x54,0x51,0x75,0x25] 49// CHECK-ERROR: instruction requires: sme2 or sve2p1 50// CHECK-UNKNOWN: 25755154 <unknown> 51 52whilege {p6.h, p7.h}, x13, x8 // 00100101-01101000-01010001-10110110 53// CHECK-INST: whilege { p6.h, p7.h }, x13, x8 54// CHECK-ENCODING: [0xb6,0x51,0x68,0x25] 55// CHECK-ERROR: instruction requires: sme2 or sve2p1 56// CHECK-UNKNOWN: 256851b6 <unknown> 57 58whilege {p14.h, p15.h}, xzr, xzr // 00100101-01111111-01010011-11111110 59// CHECK-INST: whilege { p14.h, p15.h }, xzr, xzr 60// CHECK-ENCODING: [0xfe,0x53,0x7f,0x25] 61// CHECK-ERROR: instruction requires: sme2 or sve2p1 62// CHECK-UNKNOWN: 257f53fe <unknown> 63 64whilege pn8.s, x0, x0, vlx2 // 00100101-10100000-01000000-00010000 65// CHECK-INST: whilege pn8.s, x0, x0, vlx2 66// CHECK-ENCODING: [0x10,0x40,0xa0,0x25] 67// CHECK-ERROR: instruction requires: sme2 or sve2p1 68// CHECK-UNKNOWN: 25a04010 <unknown> 69 70whilege pn13.s, x10, x21, vlx2 // 00100101-10110101-01000001-01010101 71// CHECK-INST: whilege pn13.s, x10, x21, vlx2 72// CHECK-ENCODING: [0x55,0x41,0xb5,0x25] 73// CHECK-ERROR: instruction requires: sme2 or sve2p1 74// CHECK-UNKNOWN: 25b54155 <unknown> 75 76whilege pn15.s, x13, x8, vlx4 // 00100101-10101000-01100001-10110111 77// CHECK-INST: whilege pn15.s, x13, x8, vlx4 78// CHECK-ENCODING: [0xb7,0x61,0xa8,0x25] 79// CHECK-ERROR: instruction requires: sme2 or sve2p1 80// CHECK-UNKNOWN: 25a861b7 <unknown> 81 82whilege pn15.s, xzr, xzr, vlx4 // 00100101-10111111-01100011-11110111 83// CHECK-INST: whilege pn15.s, xzr, xzr, vlx4 84// CHECK-ENCODING: [0xf7,0x63,0xbf,0x25] 85// CHECK-ERROR: instruction requires: sme2 or sve2p1 86// CHECK-UNKNOWN: 25bf63f7 <unknown> 87 88whilege {p0.s, p1.s}, x0, x0 // 00100101-10100000-01010000-00010000 89// CHECK-INST: whilege { p0.s, p1.s }, x0, x0 90// CHECK-ENCODING: [0x10,0x50,0xa0,0x25] 91// CHECK-ERROR: instruction requires: sme2 or sve2p1 92// CHECK-UNKNOWN: 25a05010 <unknown> 93 94whilege {p4.s, p5.s}, x10, x21 // 00100101-10110101-01010001-01010100 95// CHECK-INST: whilege { p4.s, p5.s }, x10, x21 96// CHECK-ENCODING: [0x54,0x51,0xb5,0x25] 97// CHECK-ERROR: instruction requires: sme2 or sve2p1 98// CHECK-UNKNOWN: 25b55154 <unknown> 99 100whilege {p6.s, p7.s}, x13, x8 // 00100101-10101000-01010001-10110110 101// CHECK-INST: whilege { p6.s, p7.s }, x13, x8 102// CHECK-ENCODING: [0xb6,0x51,0xa8,0x25] 103// CHECK-ERROR: instruction requires: sme2 or sve2p1 104// CHECK-UNKNOWN: 25a851b6 <unknown> 105 106whilege {p14.s, p15.s}, xzr, xzr // 00100101-10111111-01010011-11111110 107// CHECK-INST: whilege { p14.s, p15.s }, xzr, xzr 108// CHECK-ENCODING: [0xfe,0x53,0xbf,0x25] 109// CHECK-ERROR: instruction requires: sme2 or sve2p1 110// CHECK-UNKNOWN: 25bf53fe <unknown> 111 112 113whilege pn8.d, x0, x0, vlx2 // 00100101-11100000-01000000-00010000 114// CHECK-INST: whilege pn8.d, x0, x0, vlx2 115// CHECK-ENCODING: [0x10,0x40,0xe0,0x25] 116// CHECK-ERROR: instruction requires: sme2 or sve2p1 117// CHECK-UNKNOWN: 25e04010 <unknown> 118 119whilege pn13.d, x10, x21, vlx2 // 00100101-11110101-01000001-01010101 120// CHECK-INST: whilege pn13.d, x10, x21, vlx2 121// CHECK-ENCODING: [0x55,0x41,0xf5,0x25] 122// CHECK-ERROR: instruction requires: sme2 or sve2p1 123// CHECK-UNKNOWN: 25f54155 <unknown> 124 125whilege pn15.d, x13, x8, vlx4 // 00100101-11101000-01100001-10110111 126// CHECK-INST: whilege pn15.d, x13, x8, vlx4 127// CHECK-ENCODING: [0xb7,0x61,0xe8,0x25] 128// CHECK-ERROR: instruction requires: sme2 or sve2p1 129// CHECK-UNKNOWN: 25e861b7 <unknown> 130 131whilege pn15.d, xzr, xzr, vlx4 // 00100101-11111111-01100011-11110111 132// CHECK-INST: whilege pn15.d, xzr, xzr, vlx4 133// CHECK-ENCODING: [0xf7,0x63,0xff,0x25] 134// CHECK-ERROR: instruction requires: sme2 or sve2p1 135// CHECK-UNKNOWN: 25ff63f7 <unknown> 136 137whilege {p0.d, p1.d}, x0, x0 // 00100101-11100000-01010000-00010000 138// CHECK-INST: whilege { p0.d, p1.d }, x0, x0 139// CHECK-ENCODING: [0x10,0x50,0xe0,0x25] 140// CHECK-ERROR: instruction requires: sme2 or sve2p1 141// CHECK-UNKNOWN: 25e05010 <unknown> 142 143whilege {p4.d, p5.d}, x10, x21 // 00100101-11110101-01010001-01010100 144// CHECK-INST: whilege { p4.d, p5.d }, x10, x21 145// CHECK-ENCODING: [0x54,0x51,0xf5,0x25] 146// CHECK-ERROR: instruction requires: sme2 or sve2p1 147// CHECK-UNKNOWN: 25f55154 <unknown> 148 149whilege {p6.d, p7.d}, x13, x8 // 00100101-11101000-01010001-10110110 150// CHECK-INST: whilege { p6.d, p7.d }, x13, x8 151// CHECK-ENCODING: [0xb6,0x51,0xe8,0x25] 152// CHECK-ERROR: instruction requires: sme2 or sve2p1 153// CHECK-UNKNOWN: 25e851b6 <unknown> 154 155whilege {p14.d, p15.d}, xzr, xzr // 00100101-11111111-01010011-11111110 156// CHECK-INST: whilege { p14.d, p15.d }, xzr, xzr 157// CHECK-ENCODING: [0xfe,0x53,0xff,0x25] 158// CHECK-ERROR: instruction requires: sme2 or sve2p1 159// CHECK-UNKNOWN: 25ff53fe <unknown> 160 161 162whilege pn8.b, x0, x0, vlx2 // 00100101-00100000-01000000-00010000 163// CHECK-INST: whilege pn8.b, x0, x0, vlx2 164// CHECK-ENCODING: [0x10,0x40,0x20,0x25] 165// CHECK-ERROR: instruction requires: sme2 or sve2p1 166// CHECK-UNKNOWN: 25204010 <unknown> 167 168whilege pn13.b, x10, x21, vlx2 // 00100101-00110101-01000001-01010101 169// CHECK-INST: whilege pn13.b, x10, x21, vlx2 170// CHECK-ENCODING: [0x55,0x41,0x35,0x25] 171// CHECK-ERROR: instruction requires: sme2 or sve2p1 172// CHECK-UNKNOWN: 25354155 <unknown> 173 174whilege pn15.b, x13, x8, vlx4 // 00100101-00101000-01100001-10110111 175// CHECK-INST: whilege pn15.b, x13, x8, vlx4 176// CHECK-ENCODING: [0xb7,0x61,0x28,0x25] 177// CHECK-ERROR: instruction requires: sme2 or sve2p1 178// CHECK-UNKNOWN: 252861b7 <unknown> 179 180whilege pn15.b, xzr, xzr, vlx4 // 00100101-00111111-01100011-11110111 181// CHECK-INST: whilege pn15.b, xzr, xzr, vlx4 182// CHECK-ENCODING: [0xf7,0x63,0x3f,0x25] 183// CHECK-ERROR: instruction requires: sme2 or sve2p1 184// CHECK-UNKNOWN: 253f63f7 <unknown> 185 186whilege {p0.b, p1.b}, x0, x0 // 00100101-00100000-01010000-00010000 187// CHECK-INST: whilege { p0.b, p1.b }, x0, x0 188// CHECK-ENCODING: [0x10,0x50,0x20,0x25] 189// CHECK-ERROR: instruction requires: sme2 or sve2p1 190// CHECK-UNKNOWN: 25205010 <unknown> 191 192whilege {p4.b, p5.b}, x10, x21 // 00100101-00110101-01010001-01010100 193// CHECK-INST: whilege { p4.b, p5.b }, x10, x21 194// CHECK-ENCODING: [0x54,0x51,0x35,0x25] 195// CHECK-ERROR: instruction requires: sme2 or sve2p1 196// CHECK-UNKNOWN: 25355154 <unknown> 197 198whilege {p6.b, p7.b}, x13, x8 // 00100101-00101000-01010001-10110110 199// CHECK-INST: whilege { p6.b, p7.b }, x13, x8 200// CHECK-ENCODING: [0xb6,0x51,0x28,0x25] 201// CHECK-ERROR: instruction requires: sme2 or sve2p1 202// CHECK-UNKNOWN: 252851b6 <unknown> 203 204whilege {p14.b, p15.b}, xzr, xzr // 00100101-00111111-01010011-11111110 205// CHECK-INST: whilege { p14.b, p15.b }, xzr, xzr 206// CHECK-ENCODING: [0xfe,0x53,0x3f,0x25] 207// CHECK-ERROR: instruction requires: sme2 or sve2p1 208// CHECK-UNKNOWN: 253f53fe <unknown> 209