1// RUN: llvm-mc -o - -triple=aarch64 -show-encoding -mattr=+sve,+bf16 %s \ 2// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST 3// RUN: not llvm-mc -o - -triple=aarch64 -show-encoding %s 2>&1 \ 4// RUN: | FileCheck %s --check-prefix=CHECK-ERROR 5 6bfmlalb z0.S, z1.H, z2.H 7// CHECK-INST: bfmlalb z0.s, z1.h, z2.h 8// CHECK-ENCODING: [0x20,0x80,0xe2,0x64] 9// CHECK-ERROR: instruction requires: bf16 sve 10 11bfmlalt z0.S, z1.H, z2.H 12// CHECK-INST: bfmlalt z0.s, z1.h, z2.h 13// CHECK-ENCODING: [0x20,0x84,0xe2,0x64] 14// CHECK-ERROR: instruction requires: bf16 sve 15 16bfmlalb z0.S, z1.H, z2.H[0] 17// CHECK-INST: bfmlalb z0.s, z1.h, z2.h[0] 18// CHECK-ENCODING: [0x20,0x40,0xe2,0x64] 19// CHECK-ERROR: instruction requires: bf16 sve 20 21bfmlalt z0.S, z1.H, z2.H[0] 22// CHECK-INST: bfmlalt z0.s, z1.h, z2.h[0] 23// CHECK-ENCODING: [0x20,0x44,0xe2,0x64] 24// CHECK-ERROR: instruction requires: bf16 sve 25 26bfmlalb z0.S, z1.H, z2.H[7] 27// CHECK-INST: bfmlalb z0.s, z1.h, z2.h[7] 28// CHECK-ENCODING: [0x20,0x48,0xfa,0x64] 29// CHECK-ERROR: instruction requires: bf16 sve 30 31bfmlalt z0.S, z1.H, z2.H[7] 32// CHECK-INST: bfmlalt z0.s, z1.h, z2.h[7] 33// CHECK-ENCODING: [0x20,0x4c,0xfa,0x64] 34// CHECK-ERROR: instruction requires: bf16 sve 35 36bfmlalt z0.S, z1.H, z7.H[7] 37// CHECK-INST: bfmlalt z0.s, z1.h, z7.h[7] 38// CHECK-ENCODING: [0x20,0x4c,0xff,0x64] 39// CHECK-ERROR: instruction requires: bf16 sve 40 41bfmlalb z10.S, z21.H, z14.H 42// CHECK-INST: bfmlalb z10.s, z21.h, z14.h 43// CHECK-ENCODING: [0xaa,0x82,0xee,0x64] 44// CHECK-ERROR: instruction requires: bf16 sve 45 46bfmlalt z14.S, z10.H, z21.H 47// CHECK-INST: bfmlalt z14.s, z10.h, z21.h 48// CHECK-ENCODING: [0x4e,0x85,0xf5,0x64] 49// CHECK-ERROR: instruction requires: bf16 sve 50 51bfmlalb z21.s, z14.h, z3.h[2] 52// CHECK-INST: bfmlalb z21.s, z14.h, z3.h[2] 53// CHECK-ENCODING: [0xd5,0x41,0xeb,0x64] 54// CHECK-ERROR: instruction requires: bf16 sve 55 56// --------------------------------------------------------------------------// 57// Test compatibility with MOVPRFX instruction. 58 59movprfx z0, z7 60// CHECK-INST: movprfx z0, z7 61// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04] 62// CHECK-ERROR: instruction requires: sve 63 64bfmlalb z0.S, z1.H, z2.H 65// CHECK-INST: bfmlalb z0.s, z1.h, z2.h 66// CHECK-ENCODING: [0x20,0x80,0xe2,0x64] 67// CHECK-ERROR: instruction requires: bf16 sve 68 69movprfx z0, z7 70// CHECK-INST: movprfx z0, z7 71// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04] 72// CHECK-ERROR: instruction requires: sve 73 74bfmlalt z0.S, z1.H, z2.H 75// CHECK-INST: bfmlalt z0.s, z1.h, z2.h 76// CHECK-ENCODING: [0x20,0x84,0xe2,0x64] 77// CHECK-ERROR: instruction requires: bf16 sve 78 79movprfx z0, z7 80// CHECK-INST: movprfx z0, z7 81// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04] 82// CHECK-ERROR: instruction requires: sve 83 84bfmlalb z0.S, z1.H, z2.H[0] 85// CHECK-INST: bfmlalb z0.s, z1.h, z2.h[0] 86// CHECK-ENCODING: [0x20,0x40,0xe2,0x64] 87// CHECK-ERROR: instruction requires: bf16 sve 88 89movprfx z0, z7 90// CHECK-INST: movprfx z0, z7 91// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04] 92// CHECK-ERROR: instruction requires: sve 93 94bfmlalt z0.S, z1.H, z2.H[0] 95// CHECK-INST: bfmlalt z0.s, z1.h, z2.h[0] 96// CHECK-ENCODING: [0x20,0x44,0xe2,0x64] 97// CHECK-ERROR: instruction requires: bf16 sve 98 99movprfx z0, z7 100// CHECK-INST: movprfx z0, z7 101// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04] 102// CHECK-ERROR: instruction requires: sve 103 104bfmlalb z0.S, z1.H, z2.H[7] 105// CHECK-INST: bfmlalb z0.s, z1.h, z2.h[7] 106// CHECK-ENCODING: [0x20,0x48,0xfa,0x64] 107// CHECK-ERROR: instruction requires: bf16 sve 108 109movprfx z0, z7 110// CHECK-INST: movprfx z0, z7 111// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04] 112// CHECK-ERROR: instruction requires: sve 113 114bfmlalt z0.S, z1.H, z2.H[7] 115// CHECK-INST: bfmlalt z0.s, z1.h, z2.h[7] 116// CHECK-ENCODING: [0x20,0x4c,0xfa,0x64] 117// CHECK-ERROR: instruction requires: bf16 sve 118 119movprfx z0, z7 120// CHECK-INST: movprfx z0, z7 121// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04] 122// CHECK-ERROR: instruction requires: sve 123 124bfmlalt z0.S, z1.H, z7.H[7] 125// CHECK-INST: bfmlalt z0.s, z1.h, z7.h[7] 126// CHECK-ENCODING: [0x20,0x4c,0xff,0x64] 127// CHECK-ERROR: instruction requires: bf16 sve 128 129movprfx z10, z7 130// CHECK-INST: movprfx z10, z7 131// CHECK-ENCODING: [0xea,0xbc,0x20,0x04] 132// CHECK-ERROR: instruction requires: sve 133 134bfmlalb z10.S, z21.H, z14.H 135// CHECK-INST: bfmlalb z10.s, z21.h, z14.h 136// CHECK-ENCODING: [0xaa,0x82,0xee,0x64] 137// CHECK-ERROR: instruction requires: bf16 sve 138 139movprfx z14, z7 140// CHECK-INST: movprfx z14, z7 141// CHECK-ENCODING: [0xee,0xbc,0x20,0x04] 142// CHECK-ERROR: instruction requires: sve 143 144bfmlalt z14.S, z10.H, z21.H 145// CHECK-INST: bfmlalt z14.s, z10.h, z21.h 146// CHECK-ENCODING: [0x4e,0x85,0xf5,0x64] 147// CHECK-ERROR: instruction requires: bf16 sve 148 149movprfx z21, z7 150// CHECK-INST: movprfx z21, z7 151// CHECK-ENCODING: [0xf5,0xbc,0x20,0x04] 152// CHECK-ERROR: instruction requires: sve 153 154bfmlalb z21.s, z14.h, z3.h[2] 155// CHECK-INST: bfmlalb z21.s, z14.h, z3.h[2] 156// CHECK-ENCODING: [0xd5,0x41,0xeb,0x64] 157// CHECK-ERROR: instruction requires: bf16 sve 158