1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %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=+sve2 < %s \ 8// RUN: | llvm-objdump --no-print-imm-hex -d --mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST 9// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \ 10// RUN: | llvm-objdump --no-print-imm-hex -d --mattr=-sve2 - | FileCheck %s --check-prefix=CHECK-UNKNOWN 11 12sqshl z0.b, p0/m, z0.b, z1.b 13// CHECK-INST: sqshl z0.b, p0/m, z0.b, z1.b 14// CHECK-ENCODING: [0x20,0x80,0x08,0x44] 15// CHECK-ERROR: instruction requires: sve2 or sme 16// CHECK-UNKNOWN: 44088020 <unknown> 17 18sqshl z0.h, p0/m, z0.h, z1.h 19// CHECK-INST: sqshl z0.h, p0/m, z0.h, z1.h 20// CHECK-ENCODING: [0x20,0x80,0x48,0x44] 21// CHECK-ERROR: instruction requires: sve2 or sme 22// CHECK-UNKNOWN: 44488020 <unknown> 23 24sqshl z29.s, p7/m, z29.s, z30.s 25// CHECK-INST: sqshl z29.s, p7/m, z29.s, z30.s 26// CHECK-ENCODING: [0xdd,0x9f,0x88,0x44] 27// CHECK-ERROR: instruction requires: sve2 or sme 28// CHECK-UNKNOWN: 44889fdd <unknown> 29 30sqshl z31.d, p7/m, z31.d, z30.d 31// CHECK-INST: sqshl z31.d, p7/m, z31.d, z30.d 32// CHECK-ENCODING: [0xdf,0x9f,0xc8,0x44] 33// CHECK-ERROR: instruction requires: sve2 or sme 34// CHECK-UNKNOWN: 44c89fdf <unknown> 35 36sqshl z0.b, p0/m, z0.b, #0 37// CHECK-INST: sqshl z0.b, p0/m, z0.b, #0 38// CHECK-ENCODING: [0x00,0x81,0x06,0x04] 39// CHECK-ERROR: instruction requires: sve2 or sme 40// CHECK-UNKNOWN: 04068100 <unknown> 41 42sqshl z31.b, p0/m, z31.b, #7 43// CHECK-INST: sqshl z31.b, p0/m, z31.b, #7 44// CHECK-ENCODING: [0xff,0x81,0x06,0x04] 45// CHECK-ERROR: instruction requires: sve2 or sme 46// CHECK-UNKNOWN: 040681ff <unknown> 47 48sqshl z0.h, p0/m, z0.h, #0 49// CHECK-INST: sqshl z0.h, p0/m, z0.h, #0 50// CHECK-ENCODING: [0x00,0x82,0x06,0x04] 51// CHECK-ERROR: instruction requires: sve2 or sme 52// CHECK-UNKNOWN: 04068200 <unknown> 53 54sqshl z31.h, p0/m, z31.h, #15 55// CHECK-INST: sqshl z31.h, p0/m, z31.h, #15 56// CHECK-ENCODING: [0xff,0x83,0x06,0x04] 57// CHECK-ERROR: instruction requires: sve2 or sme 58// CHECK-UNKNOWN: 040683ff <unknown> 59 60sqshl z0.s, p0/m, z0.s, #0 61// CHECK-INST: sqshl z0.s, p0/m, z0.s, #0 62// CHECK-ENCODING: [0x00,0x80,0x46,0x04] 63// CHECK-ERROR: instruction requires: sve2 or sme 64// CHECK-UNKNOWN: 04468000 <unknown> 65 66sqshl z31.s, p0/m, z31.s, #31 67// CHECK-INST: sqshl z31.s, p0/m, z31.s, #31 68// CHECK-ENCODING: [0xff,0x83,0x46,0x04] 69// CHECK-ERROR: instruction requires: sve2 or sme 70// CHECK-UNKNOWN: 044683ff <unknown> 71 72sqshl z0.d, p0/m, z0.d, #0 73// CHECK-INST: sqshl z0.d, p0/m, z0.d, #0 74// CHECK-ENCODING: [0x00,0x80,0x86,0x04] 75// CHECK-ERROR: instruction requires: sve2 or sme 76// CHECK-UNKNOWN: 04868000 <unknown> 77 78sqshl z31.d, p0/m, z31.d, #63 79// CHECK-INST: sqshl z31.d, p0/m, z31.d, #63 80// CHECK-ENCODING: [0xff,0x83,0xc6,0x04] 81// CHECK-ERROR: instruction requires: sve2 or sme 82// CHECK-UNKNOWN: 04c683ff <unknown> 83 84// --------------------------------------------------------------------------// 85// Test compatibility with MOVPRFX instruction. 86 87movprfx z31.d, p0/z, z6.d 88// CHECK-INST: movprfx z31.d, p0/z, z6.d 89// CHECK-ENCODING: [0xdf,0x20,0xd0,0x04] 90// CHECK-ERROR: instruction requires: sve or sme 91// CHECK-UNKNOWN: 04d020df <unknown> 92 93sqshl z31.d, p0/m, z31.d, z30.d 94// CHECK-INST: sqshl z31.d, p0/m, z31.d, z30.d 95// CHECK-ENCODING: [0xdf,0x83,0xc8,0x44] 96// CHECK-ERROR: instruction requires: sve2 or sme 97// CHECK-UNKNOWN: 44c883df <unknown> 98 99movprfx z31, z6 100// CHECK-INST: movprfx z31, z6 101// CHECK-ENCODING: [0xdf,0xbc,0x20,0x04] 102// CHECK-ERROR: instruction requires: sve or sme 103// CHECK-UNKNOWN: 0420bcdf <unknown> 104 105sqshl z31.d, p7/m, z31.d, z30.d 106// CHECK-INST: sqshl z31.d, p7/m, z31.d, z30.d 107// CHECK-ENCODING: [0xdf,0x9f,0xc8,0x44] 108// CHECK-ERROR: instruction requires: sve2 or sme 109// CHECK-UNKNOWN: 44c89fdf <unknown> 110 111movprfx z31.d, p0/z, z6.d 112// CHECK-INST: movprfx z31.d, p0/z, z6.d 113// CHECK-ENCODING: [0xdf,0x20,0xd0,0x04] 114// CHECK-ERROR: instruction requires: sve or sme 115// CHECK-UNKNOWN: 04d020df <unknown> 116 117sqshl z31.d, p0/m, z31.d, #63 118// CHECK-INST: sqshl z31.d, p0/m, z31.d, #63 119// CHECK-ENCODING: [0xff,0x83,0xc6,0x04] 120// CHECK-ERROR: instruction requires: sve2 or sme 121// CHECK-UNKNOWN: 04c683ff <unknown> 122 123movprfx z31, z6 124// CHECK-INST: movprfx z31, z6 125// CHECK-ENCODING: [0xdf,0xbc,0x20,0x04] 126// CHECK-ERROR: instruction requires: sve or sme 127// CHECK-UNKNOWN: 0420bcdf <unknown> 128 129sqshl z31.d, p0/m, z31.d, #63 130// CHECK-INST: sqshl z31.d, p0/m, z31.d, #63 131// CHECK-ENCODING: [0xff,0x83,0xc6,0x04] 132// CHECK-ERROR: instruction requires: sve2 or sme 133// CHECK-UNKNOWN: 04c683ff <unknown> 134