160 lines · plain
1// RUN: llvm-mc -o - -triple=aarch64 -show-encoding -mattr=+sve,+bf16 %s \2// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST3// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme,+bf16 < %s \4// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST5// RUN: not llvm-mc -o - -triple=aarch64 -show-encoding %s 2>&1 \6// RUN: | FileCheck %s --check-prefix=CHECK-ERROR7 8bfmlalb z0.S, z1.H, z2.H9// CHECK-INST: bfmlalb z0.s, z1.h, z2.h10// CHECK-ENCODING: [0x20,0x80,0xe2,0x64]11// CHECK-ERROR: instruction requires: bf16 sve or sme12 13bfmlalt z0.S, z1.H, z2.H14// CHECK-INST: bfmlalt z0.s, z1.h, z2.h15// CHECK-ENCODING: [0x20,0x84,0xe2,0x64]16// CHECK-ERROR: instruction requires: bf16 sve or sme17 18bfmlalb z0.S, z1.H, z2.H[0]19// CHECK-INST: bfmlalb z0.s, z1.h, z2.h[0]20// CHECK-ENCODING: [0x20,0x40,0xe2,0x64]21// CHECK-ERROR: instruction requires: bf16 sve or sme22 23bfmlalt z0.S, z1.H, z2.H[0]24// CHECK-INST: bfmlalt z0.s, z1.h, z2.h[0]25// CHECK-ENCODING: [0x20,0x44,0xe2,0x64]26// CHECK-ERROR: instruction requires: bf16 sve or sme27 28bfmlalb z0.S, z1.H, z2.H[7]29// CHECK-INST: bfmlalb z0.s, z1.h, z2.h[7]30// CHECK-ENCODING: [0x20,0x48,0xfa,0x64]31// CHECK-ERROR: instruction requires: bf16 sve or sme32 33bfmlalt z0.S, z1.H, z2.H[7]34// CHECK-INST: bfmlalt z0.s, z1.h, z2.h[7]35// CHECK-ENCODING: [0x20,0x4c,0xfa,0x64]36// CHECK-ERROR: instruction requires: bf16 sve or sme37 38bfmlalt z0.S, z1.H, z7.H[7]39// CHECK-INST: bfmlalt z0.s, z1.h, z7.h[7]40// CHECK-ENCODING: [0x20,0x4c,0xff,0x64]41// CHECK-ERROR: instruction requires: bf16 sve or sme42 43bfmlalb z10.S, z21.H, z14.H44// CHECK-INST: bfmlalb z10.s, z21.h, z14.h45// CHECK-ENCODING: [0xaa,0x82,0xee,0x64]46// CHECK-ERROR: instruction requires: bf16 sve or sme47 48bfmlalt z14.S, z10.H, z21.H49// CHECK-INST: bfmlalt z14.s, z10.h, z21.h50// CHECK-ENCODING: [0x4e,0x85,0xf5,0x64]51// CHECK-ERROR: instruction requires: bf16 sve or sme52 53bfmlalb z21.s, z14.h, z3.h[2]54// CHECK-INST: bfmlalb z21.s, z14.h, z3.h[2]55// CHECK-ENCODING: [0xd5,0x41,0xeb,0x64]56// CHECK-ERROR: instruction requires: bf16 sve or sme57 58// --------------------------------------------------------------------------//59// Test compatibility with MOVPRFX instruction.60 61movprfx z0, z762// CHECK-INST: movprfx z0, z763// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]64// CHECK-ERROR: instruction requires: sve or sme65 66bfmlalb z0.S, z1.H, z2.H67// CHECK-INST: bfmlalb z0.s, z1.h, z2.h68// CHECK-ENCODING: [0x20,0x80,0xe2,0x64]69// CHECK-ERROR: instruction requires: bf16 sve or sme70 71movprfx z0, z772// CHECK-INST: movprfx z0, z773// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]74// CHECK-ERROR: instruction requires: sve or sme75 76bfmlalt z0.S, z1.H, z2.H77// CHECK-INST: bfmlalt z0.s, z1.h, z2.h78// CHECK-ENCODING: [0x20,0x84,0xe2,0x64]79// CHECK-ERROR: instruction requires: bf16 sve or sme80 81movprfx z0, z782// CHECK-INST: movprfx z0, z783// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]84// CHECK-ERROR: instruction requires: sve or sme85 86bfmlalb z0.S, z1.H, z2.H[0]87// CHECK-INST: bfmlalb z0.s, z1.h, z2.h[0]88// CHECK-ENCODING: [0x20,0x40,0xe2,0x64]89// CHECK-ERROR: instruction requires: bf16 sve or sme90 91movprfx z0, z792// CHECK-INST: movprfx z0, z793// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]94// CHECK-ERROR: instruction requires: sve or sme95 96bfmlalt z0.S, z1.H, z2.H[0]97// CHECK-INST: bfmlalt z0.s, z1.h, z2.h[0]98// CHECK-ENCODING: [0x20,0x44,0xe2,0x64]99// CHECK-ERROR: instruction requires: bf16 sve or sme100 101movprfx z0, z7102// CHECK-INST: movprfx z0, z7103// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]104// CHECK-ERROR: instruction requires: sve or sme105 106bfmlalb z0.S, z1.H, z2.H[7]107// CHECK-INST: bfmlalb z0.s, z1.h, z2.h[7]108// CHECK-ENCODING: [0x20,0x48,0xfa,0x64]109// CHECK-ERROR: instruction requires: bf16 sve or sme110 111movprfx z0, z7112// CHECK-INST: movprfx z0, z7113// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]114// CHECK-ERROR: instruction requires: sve or sme115 116bfmlalt z0.S, z1.H, z2.H[7]117// CHECK-INST: bfmlalt z0.s, z1.h, z2.h[7]118// CHECK-ENCODING: [0x20,0x4c,0xfa,0x64]119// CHECK-ERROR: instruction requires: bf16 sve or sme120 121movprfx z0, z7122// CHECK-INST: movprfx z0, z7123// CHECK-ENCODING: [0xe0,0xbc,0x20,0x04]124// CHECK-ERROR: instruction requires: sve or sme125 126bfmlalt z0.S, z1.H, z7.H[7]127// CHECK-INST: bfmlalt z0.s, z1.h, z7.h[7]128// CHECK-ENCODING: [0x20,0x4c,0xff,0x64]129// CHECK-ERROR: instruction requires: bf16 sve or sme130 131movprfx z10, z7132// CHECK-INST: movprfx z10, z7133// CHECK-ENCODING: [0xea,0xbc,0x20,0x04]134// CHECK-ERROR: instruction requires: sve or sme135 136bfmlalb z10.S, z21.H, z14.H137// CHECK-INST: bfmlalb z10.s, z21.h, z14.h138// CHECK-ENCODING: [0xaa,0x82,0xee,0x64]139// CHECK-ERROR: instruction requires: bf16 sve or sme140 141movprfx z14, z7142// CHECK-INST: movprfx z14, z7143// CHECK-ENCODING: [0xee,0xbc,0x20,0x04]144// CHECK-ERROR: instruction requires: sve or sme145 146bfmlalt z14.S, z10.H, z21.H147// CHECK-INST: bfmlalt z14.s, z10.h, z21.h148// CHECK-ENCODING: [0x4e,0x85,0xf5,0x64]149// CHECK-ERROR: instruction requires: bf16 sve or sme150 151movprfx z21, z7152// CHECK-INST: movprfx z21, z7153// CHECK-ENCODING: [0xf5,0xbc,0x20,0x04]154// CHECK-ERROR: instruction requires: sve or sme155 156bfmlalb z21.s, z14.h, z3.h[2]157// CHECK-INST: bfmlalb z21.s, z14.h, z3.h[2]158// CHECK-ENCODING: [0xd5,0x41,0xeb,0x64]159// CHECK-ERROR: instruction requires: bf16 sve or sme160