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 10uqshl z0.b, p0/m, z0.b, z1.b 11// CHECK-INST: uqshl z0.b, p0/m, z0.b, z1.b 12// CHECK-ENCODING: [0x20,0x80,0x09,0x44] 13// CHECK-ERROR: instruction requires: sve2 14// CHECK-UNKNOWN: 20 80 09 44 <unknown> 15 16uqshl z0.h, p0/m, z0.h, z1.h 17// CHECK-INST: uqshl z0.h, p0/m, z0.h, z1.h 18// CHECK-ENCODING: [0x20,0x80,0x49,0x44] 19// CHECK-ERROR: instruction requires: sve2 20// CHECK-UNKNOWN: 20 80 49 44 <unknown> 21 22uqshl z29.s, p7/m, z29.s, z30.s 23// CHECK-INST: uqshl z29.s, p7/m, z29.s, z30.s 24// CHECK-ENCODING: [0xdd,0x9f,0x89,0x44] 25// CHECK-ERROR: instruction requires: sve2 26// CHECK-UNKNOWN: dd 9f 89 44 <unknown> 27 28uqshl z31.d, p7/m, z31.d, z30.d 29// CHECK-INST: uqshl z31.d, p7/m, z31.d, z30.d 30// CHECK-ENCODING: [0xdf,0x9f,0xc9,0x44] 31// CHECK-ERROR: instruction requires: sve2 32// CHECK-UNKNOWN: df 9f c9 44 <unknown> 33 34uqshl z0.b, p0/m, z0.b, #0 35// CHECK-INST: uqshl z0.b, p0/m, z0.b, #0 36// CHECK-ENCODING: [0x00,0x81,0x07,0x04] 37// CHECK-ERROR: instruction requires: sve2 38// CHECK-UNKNOWN: 00 81 07 04 <unknown> 39 40uqshl z31.b, p0/m, z31.b, #7 41// CHECK-INST: uqshl z31.b, p0/m, z31.b, #7 42// CHECK-ENCODING: [0xff,0x81,0x07,0x04] 43// CHECK-ERROR: instruction requires: sve2 44// CHECK-UNKNOWN: ff 81 07 04 <unknown> 45 46uqshl z0.h, p0/m, z0.h, #0 47// CHECK-INST: uqshl z0.h, p0/m, z0.h, #0 48// CHECK-ENCODING: [0x00,0x82,0x07,0x04] 49// CHECK-ERROR: instruction requires: sve2 50// CHECK-UNKNOWN: 00 82 07 04 <unknown> 51 52uqshl z31.h, p0/m, z31.h, #15 53// CHECK-INST: uqshl z31.h, p0/m, z31.h, #15 54// CHECK-ENCODING: [0xff,0x83,0x07,0x04] 55// CHECK-ERROR: instruction requires: sve2 56// CHECK-UNKNOWN: ff 83 07 04 <unknown> 57 58uqshl z0.s, p0/m, z0.s, #0 59// CHECK-INST: uqshl z0.s, p0/m, z0.s, #0 60// CHECK-ENCODING: [0x00,0x80,0x47,0x04] 61// CHECK-ERROR: instruction requires: sve2 62// CHECK-UNKNOWN: 00 80 47 04 <unknown> 63 64uqshl z31.s, p0/m, z31.s, #31 65// CHECK-INST: uqshl z31.s, p0/m, z31.s, #31 66// CHECK-ENCODING: [0xff,0x83,0x47,0x04] 67// CHECK-ERROR: instruction requires: sve2 68// CHECK-UNKNOWN: ff 83 47 04 <unknown> 69 70uqshl z0.d, p0/m, z0.d, #0 71// CHECK-INST: uqshl z0.d, p0/m, z0.d, #0 72// CHECK-ENCODING: [0x00,0x80,0x87,0x04] 73// CHECK-ERROR: instruction requires: sve2 74// CHECK-UNKNOWN: 00 80 87 04 <unknown> 75 76uqshl z31.d, p0/m, z31.d, #63 77// CHECK-INST: uqshl z31.d, p0/m, z31.d, #63 78// CHECK-ENCODING: [0xff,0x83,0xc7,0x04] 79// CHECK-ERROR: instruction requires: sve2 80// CHECK-UNKNOWN: ff 83 c7 04 <unknown> 81 82// --------------------------------------------------------------------------// 83// Test compatibility with MOVPRFX instruction. 84 85movprfx z31.d, p0/z, z6.d 86// CHECK-INST: movprfx z31.d, p0/z, z6.d 87// CHECK-ENCODING: [0xdf,0x20,0xd0,0x04] 88// CHECK-ERROR: instruction requires: sve 89// CHECK-UNKNOWN: df 20 d0 04 <unknown> 90 91uqshl z31.d, p0/m, z31.d, z30.d 92// CHECK-INST: uqshl z31.d, p0/m, z31.d, z30.d 93// CHECK-ENCODING: [0xdf,0x83,0xc9,0x44] 94// CHECK-ERROR: instruction requires: sve2 95// CHECK-UNKNOWN: df 83 c9 44 <unknown> 96 97movprfx z31, z6 98// CHECK-INST: movprfx z31, z6 99// CHECK-ENCODING: [0xdf,0xbc,0x20,0x04] 100// CHECK-ERROR: instruction requires: sve 101// CHECK-UNKNOWN: df bc 20 04 <unknown> 102 103uqshl z31.d, p7/m, z31.d, z30.d 104// CHECK-INST: uqshl z31.d, p7/m, z31.d, z30.d 105// CHECK-ENCODING: [0xdf,0x9f,0xc9,0x44] 106// CHECK-ERROR: instruction requires: sve2 107// CHECK-UNKNOWN: df 9f c9 44 <unknown> 108 109movprfx z31.d, p0/z, z6.d 110// CHECK-INST: movprfx z31.d, p0/z, z6.d 111// CHECK-ENCODING: [0xdf,0x20,0xd0,0x04] 112// CHECK-ERROR: instruction requires: sve 113// CHECK-UNKNOWN: df 20 d0 04 <unknown> 114 115uqshl z31.d, p0/m, z31.d, #63 116// CHECK-INST: uqshl z31.d, p0/m, z31.d, #63 117// CHECK-ENCODING: [0xff,0x83,0xc7,0x04] 118// CHECK-ERROR: instruction requires: sve2 119// CHECK-UNKNOWN: ff 83 c7 04 <unknown> 120 121movprfx z31, z6 122// CHECK-INST: movprfx z31, z6 123// CHECK-ENCODING: [0xdf,0xbc,0x20,0x04] 124// CHECK-ERROR: instruction requires: sve 125// CHECK-UNKNOWN: df bc 20 04 <unknown> 126 127uqshl z31.d, p0/m, z31.d, #63 128// CHECK-INST: uqshl z31.d, p0/m, z31.d, #63 129// CHECK-ENCODING: [0xff,0x83,0xc7,0x04] 130// CHECK-ERROR: instruction requires: sve2 131// CHECK-UNKNOWN: ff 83 c7 04 <unknown> 132