1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme-f16f16 < %s \ 2// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST 3// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme-f8f16 < %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=+sme-f16f16 < %s \ 8// RUN: | llvm-objdump -d --mattr=+sme-f16f16 - | FileCheck %s --check-prefix=CHECK-INST 9// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme-f16f16 < %s \ 10// RUN: | llvm-objdump -d --mattr=-sme2p1 - | FileCheck %s --check-prefix=CHECK-UNKNOWN 11// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme-f16f16 < %s \ 12// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ 13// RUN: | llvm-mc -triple=aarch64 -mattr=+sme-f16f16 -disassemble -show-encoding \ 14// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST 15 16fadd za.h[w8, 0, vgx2], {z0.h, z1.h} // 11000001-10100100-00011100-00000000 17// CHECK-INST: fadd za.h[w8, 0, vgx2], { z0.h, z1.h } 18// CHECK-ENCODING: [0x00,0x1c,0xa4,0xc1] 19// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 20// CHECK-UNKNOWN: c1a41c00 <unknown> 21 22fadd za.h[w8, 0], {z0.h - z1.h} // 11000001-10100100-00011100-00000000 23// CHECK-INST: fadd za.h[w8, 0, vgx2], { z0.h, z1.h } 24// CHECK-ENCODING: [0x00,0x1c,0xa4,0xc1] 25// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 26// CHECK-UNKNOWN: c1a41c00 <unknown> 27 28fadd za.h[w10, 5, vgx2], {z10.h, z11.h} // 11000001-10100100-01011101-01000101 29// CHECK-INST: fadd za.h[w10, 5, vgx2], { z10.h, z11.h } 30// CHECK-ENCODING: [0x45,0x5d,0xa4,0xc1] 31// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 32// CHECK-UNKNOWN: c1a45d45 <unknown> 33 34fadd za.h[w10, 5], {z10.h - z11.h} // 11000001-10100100-01011101-01000101 35// CHECK-INST: fadd za.h[w10, 5, vgx2], { z10.h, z11.h } 36// CHECK-ENCODING: [0x45,0x5d,0xa4,0xc1] 37// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 38// CHECK-UNKNOWN: c1a45d45 <unknown> 39 40fadd za.h[w11, 7, vgx2], {z12.h, z13.h} // 11000001-10100100-01111101-10000111 41// CHECK-INST: fadd za.h[w11, 7, vgx2], { z12.h, z13.h } 42// CHECK-ENCODING: [0x87,0x7d,0xa4,0xc1] 43// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 44// CHECK-UNKNOWN: c1a47d87 <unknown> 45 46fadd za.h[w11, 7], {z12.h - z13.h} // 11000001-10100100-01111101-10000111 47// CHECK-INST: fadd za.h[w11, 7, vgx2], { z12.h, z13.h } 48// CHECK-ENCODING: [0x87,0x7d,0xa4,0xc1] 49// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 50// CHECK-UNKNOWN: c1a47d87 <unknown> 51 52fadd za.h[w11, 7, vgx2], {z30.h, z31.h} // 11000001-10100100-01111111-11000111 53// CHECK-INST: fadd za.h[w11, 7, vgx2], { z30.h, z31.h } 54// CHECK-ENCODING: [0xc7,0x7f,0xa4,0xc1] 55// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 56// CHECK-UNKNOWN: c1a47fc7 <unknown> 57 58fadd za.h[w11, 7], {z30.h - z31.h} // 11000001-10100100-01111111-11000111 59// CHECK-INST: fadd za.h[w11, 7, vgx2], { z30.h, z31.h } 60// CHECK-ENCODING: [0xc7,0x7f,0xa4,0xc1] 61// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 62// CHECK-UNKNOWN: c1a47fc7 <unknown> 63 64fadd za.h[w8, 5, vgx2], {z16.h, z17.h} // 11000001-10100100-00011110-00000101 65// CHECK-INST: fadd za.h[w8, 5, vgx2], { z16.h, z17.h } 66// CHECK-ENCODING: [0x05,0x1e,0xa4,0xc1] 67// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 68// CHECK-UNKNOWN: c1a41e05 <unknown> 69 70fadd za.h[w8, 5], {z16.h - z17.h} // 11000001-10100100-00011110-00000101 71// CHECK-INST: fadd za.h[w8, 5, vgx2], { z16.h, z17.h } 72// CHECK-ENCODING: [0x05,0x1e,0xa4,0xc1] 73// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 74// CHECK-UNKNOWN: c1a41e05 <unknown> 75 76fadd za.h[w8, 1, vgx2], {z0.h, z1.h} // 11000001-10100100-00011100-00000001 77// CHECK-INST: fadd za.h[w8, 1, vgx2], { z0.h, z1.h } 78// CHECK-ENCODING: [0x01,0x1c,0xa4,0xc1] 79// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 80// CHECK-UNKNOWN: c1a41c01 <unknown> 81 82fadd za.h[w8, 1], {z0.h - z1.h} // 11000001-10100100-00011100-00000001 83// CHECK-INST: fadd za.h[w8, 1, vgx2], { z0.h, z1.h } 84// CHECK-ENCODING: [0x01,0x1c,0xa4,0xc1] 85// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 86// CHECK-UNKNOWN: c1a41c01 <unknown> 87 88fadd za.h[w10, 0, vgx2], {z18.h, z19.h} // 11000001-10100100-01011110, 01000000 89// CHECK-INST: fadd za.h[w10, 0, vgx2], { z18.h, z19.h } 90// CHECK-ENCODING: [0x40,0x5e,0xa4,0xc1] 91// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 92// CHECK-UNKNOWN: c1a45e40 <unknown> 93 94fadd za.h[w10, 0], {z18.h - z19.h} // 11000001-10100100-01011110-01000000 95// CHECK-INST: fadd za.h[w10, 0, vgx2], { z18.h, z19.h } 96// CHECK-ENCODING: [0x40,0x5e,0xa4,0xc1] 97// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 98// CHECK-UNKNOWN: c1a45e40 <unknown> 99 100fadd za.h[w8, 0, vgx2], {z12.h, z13.h} // 11000001-10100100-00011101-10000000 101// CHECK-INST: fadd za.h[w8, 0, vgx2], { z12.h, z13.h } 102// CHECK-ENCODING: [0x80,0x1d,0xa4,0xc1] 103// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 104// CHECK-UNKNOWN: c1a41d80 <unknown> 105 106fadd za.h[w8, 0], {z12.h - z13.h} // 11000001-10100100-00011101-10000000 107// CHECK-INST: fadd za.h[w8, 0, vgx2], { z12.h, z13.h } 108// CHECK-ENCODING: [0x80,0x1d,0xa4,0xc1] 109// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 110// CHECK-UNKNOWN: c1a41d80 <unknown> 111 112fadd za.h[w10, 1, vgx2], {z0.h, z1.h} // 11000001-10100100-01011100-00000001 113// CHECK-INST: fadd za.h[w10, 1, vgx2], { z0.h, z1.h } 114// CHECK-ENCODING: [0x01,0x5c,0xa4,0xc1] 115// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 116// CHECK-UNKNOWN: c1a45c01 <unknown> 117 118fadd za.h[w10, 1], {z0.h - z1.h} // 11000001-10100100-01011100-00000001 119// CHECK-INST: fadd za.h[w10, 1, vgx2], { z0.h, z1.h } 120// CHECK-ENCODING: [0x01,0x5c,0xa4,0xc1] 121// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 122// CHECK-UNKNOWN: c1a45c01 <unknown> 123 124fadd za.h[w8, 5, vgx2], {z22.h, z23.h} // 11000001-10100100-00011110, 11000101 125// CHECK-INST: fadd za.h[w8, 5, vgx2], { z22.h, z23.h } 126// CHECK-ENCODING: [0xc5,0x1e,0xa4,0xc1] 127// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 128// CHECK-UNKNOWN: c1a41ec5 <unknown> 129 130fadd za.h[w8, 5], {z22.h - z23.h} // 11000001-10100100-00011110-11000101 131// CHECK-INST: fadd za.h[w8, 5, vgx2], { z22.h, z23.h } 132// CHECK-ENCODING: [0xc5,0x1e,0xa4,0xc1] 133// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 134// CHECK-UNKNOWN: c1a41ec5 <unknown> 135 136fadd za.h[w11, 2, vgx2], {z8.h, z9.h} // 11000001-10100100-01111101-00000010 137// CHECK-INST: fadd za.h[w11, 2, vgx2], { z8.h, z9.h } 138// CHECK-ENCODING: [0x02,0x7d,0xa4,0xc1] 139// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 140// CHECK-UNKNOWN: c1a47d02 <unknown> 141 142fadd za.h[w11, 2], {z8.h - z9.h} // 11000001-10100100-01111101-00000010 143// CHECK-INST: fadd za.h[w11, 2, vgx2], { z8.h, z9.h } 144// CHECK-ENCODING: [0x02,0x7d,0xa4,0xc1] 145// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 146// CHECK-UNKNOWN: c1a47d02 <unknown> 147 148fadd za.h[w9, 7, vgx2], {z12.h, z13.h} // 11000001-10100100-00111101-10000111 149// CHECK-INST: fadd za.h[w9, 7, vgx2], { z12.h, z13.h } 150// CHECK-ENCODING: [0x87,0x3d,0xa4,0xc1] 151// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 152// CHECK-UNKNOWN: c1a43d87 <unknown> 153 154fadd za.h[w9, 7], {z12.h - z13.h} // 11000001-10100100-00111101-10000111 155// CHECK-INST: fadd za.h[w9, 7, vgx2], { z12.h, z13.h } 156// CHECK-ENCODING: [0x87,0x3d,0xa4,0xc1] 157// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 158// CHECK-UNKNOWN: c1a43d87 <unknown> 159 160fadd za.h[w8, 0, vgx4], {z0.h - z3.h} // 11000001-10100101-00011100-00000000 161// CHECK-INST: fadd za.h[w8, 0, vgx4], { z0.h - z3.h } 162// CHECK-ENCODING: [0x00,0x1c,0xa5,0xc1] 163// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 164// CHECK-UNKNOWN: c1a51c00 <unknown> 165 166fadd za.h[w8, 0], {z0.h - z3.h} // 11000001-10100101-00011100-00000000 167// CHECK-INST: fadd za.h[w8, 0, vgx4], { z0.h - z3.h } 168// CHECK-ENCODING: [0x00,0x1c,0xa5,0xc1] 169// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 170// CHECK-UNKNOWN: c1a51c00 <unknown> 171 172fadd za.h[w10, 5, vgx4], {z8.h - z11.h} // 11000001-10100101-01011101-00000101 173// CHECK-INST: fadd za.h[w10, 5, vgx4], { z8.h - z11.h } 174// CHECK-ENCODING: [0x05,0x5d,0xa5,0xc1] 175// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 176// CHECK-UNKNOWN: c1a55d05 <unknown> 177 178fadd za.h[w10, 5], {z8.h - z11.h} // 11000001-10100101-01011101-00000101 179// CHECK-INST: fadd za.h[w10, 5, vgx4], { z8.h - z11.h } 180// CHECK-ENCODING: [0x05,0x5d,0xa5,0xc1] 181// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 182// CHECK-UNKNOWN: c1a55d05 <unknown> 183 184fadd za.h[w11, 7, vgx4], {z12.h - z15.h} // 11000001-10100101-01111101-10000111 185// CHECK-INST: fadd za.h[w11, 7, vgx4], { z12.h - z15.h } 186// CHECK-ENCODING: [0x87,0x7d,0xa5,0xc1] 187// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 188// CHECK-UNKNOWN: c1a57d87 <unknown> 189 190fadd za.h[w11, 7], {z12.h - z15.h} // 11000001-10100101-01111101-10000111 191// CHECK-INST: fadd za.h[w11, 7, vgx4], { z12.h - z15.h } 192// CHECK-ENCODING: [0x87,0x7d,0xa5,0xc1] 193// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 194// CHECK-UNKNOWN: c1a57d87 <unknown> 195 196fadd za.h[w11, 7, vgx4], {z28.h - z31.h} // 11000001-10100101-01111111-10000111 197// CHECK-INST: fadd za.h[w11, 7, vgx4], { z28.h - z31.h } 198// CHECK-ENCODING: [0x87,0x7f,0xa5,0xc1] 199// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 200// CHECK-UNKNOWN: c1a57f87 <unknown> 201 202fadd za.h[w11, 7], {z28.h - z31.h} // 11000001-10100101-01111111-10000111 203// CHECK-INST: fadd za.h[w11, 7, vgx4], { z28.h - z31.h } 204// CHECK-ENCODING: [0x87,0x7f,0xa5,0xc1] 205// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 206// CHECK-UNKNOWN: c1a57f87 <unknown> 207 208fadd za.h[w8, 5, vgx4], {z16.h - z19.h} // 11000001-10100101-00011110-00000101 209// CHECK-INST: fadd za.h[w8, 5, vgx4], { z16.h - z19.h } 210// CHECK-ENCODING: [0x05,0x1e,0xa5,0xc1] 211// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 212// CHECK-UNKNOWN: c1a51e05 <unknown> 213 214fadd za.h[w8, 5], {z16.h - z19.h} // 11000001-10100101-00011110-00000101 215// CHECK-INST: fadd za.h[w8, 5, vgx4], { z16.h - z19.h } 216// CHECK-ENCODING: [0x05,0x1e,0xa5,0xc1] 217// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 218// CHECK-UNKNOWN: c1a51e05 <unknown> 219 220fadd za.h[w8, 1, vgx4], {z0.h - z3.h} // 11000001-10100101-00011100-00000001 221// CHECK-INST: fadd za.h[w8, 1, vgx4], { z0.h - z3.h } 222// CHECK-ENCODING: [0x01,0x1c,0xa5,0xc1] 223// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 224// CHECK-UNKNOWN: c1a51c01 <unknown> 225 226fadd za.h[w8, 1], {z0.h - z3.h} // 11000001-10100101-00011100-00000001 227// CHECK-INST: fadd za.h[w8, 1, vgx4], { z0.h - z3.h } 228// CHECK-ENCODING: [0x01,0x1c,0xa5,0xc1] 229// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 230// CHECK-UNKNOWN: c1a51c01 <unknown> 231 232fadd za.h[w10, 0, vgx4], {z16.h - z19.h} // 11000001-10100101-01011110-00000000 233// CHECK-INST: fadd za.h[w10, 0, vgx4], { z16.h - z19.h } 234// CHECK-ENCODING: [0x00,0x5e,0xa5,0xc1] 235// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 236// CHECK-UNKNOWN: c1a55e00 <unknown> 237 238fadd za.h[w10, 0], {z16.h - z19.h} // 11000001-10100101-01011110-00000000 239// CHECK-INST: fadd za.h[w10, 0, vgx4], { z16.h - z19.h } 240// CHECK-ENCODING: [0x00,0x5e,0xa5,0xc1] 241// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 242// CHECK-UNKNOWN: c1a55e00 <unknown> 243 244fadd za.h[w8, 0, vgx4], {z12.h - z15.h} // 11000001-10100101-00011101-10000000 245// CHECK-INST: fadd za.h[w8, 0, vgx4], { z12.h - z15.h } 246// CHECK-ENCODING: [0x80,0x1d,0xa5,0xc1] 247// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 248// CHECK-UNKNOWN: c1a51d80 <unknown> 249 250fadd za.h[w8, 0], {z12.h - z15.h} // 11000001-10100101-00011101-10000000 251// CHECK-INST: fadd za.h[w8, 0, vgx4], { z12.h - z15.h } 252// CHECK-ENCODING: [0x80,0x1d,0xa5,0xc1] 253// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 254// CHECK-UNKNOWN: c1a51d80 <unknown> 255 256fadd za.h[w10, 1, vgx4], {z0.h - z3.h} // 11000001-10100101-01011100-00000001 257// CHECK-INST: fadd za.h[w10, 1, vgx4], { z0.h - z3.h } 258// CHECK-ENCODING: [0x01,0x5c,0xa5,0xc1] 259// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 260// CHECK-UNKNOWN: c1a55c01 <unknown> 261 262fadd za.h[w10, 1], {z0.h - z3.h} // 11000001-10100101-01011100-00000001 263// CHECK-INST: fadd za.h[w10, 1, vgx4], { z0.h - z3.h } 264// CHECK-ENCODING: [0x01,0x5c,0xa5,0xc1] 265// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 266// CHECK-UNKNOWN: c1a55c01 <unknown> 267 268fadd za.h[w8, 5, vgx4], {z20.h - z23.h} // 11000001-10100101-00011110-10000101 269// CHECK-INST: fadd za.h[w8, 5, vgx4], { z20.h - z23.h } 270// CHECK-ENCODING: [0x85,0x1e,0xa5,0xc1] 271// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 272// CHECK-UNKNOWN: c1a51e85 <unknown> 273 274fadd za.h[w8, 5], {z20.h - z23.h} // 11000001-10100101-00011110-10000101 275// CHECK-INST: fadd za.h[w8, 5, vgx4], { z20.h - z23.h } 276// CHECK-ENCODING: [0x85,0x1e,0xa5,0xc1] 277// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 278// CHECK-UNKNOWN: c1a51e85 <unknown> 279 280fadd za.h[w11, 2, vgx4], {z8.h - z11.h} // 11000001-10100101-01111101-00000010 281// CHECK-INST: fadd za.h[w11, 2, vgx4], { z8.h - z11.h } 282// CHECK-ENCODING: [0x02,0x7d,0xa5,0xc1] 283// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 284// CHECK-UNKNOWN: c1a57d02 <unknown> 285 286fadd za.h[w11, 2], {z8.h - z11.h} // 11000001-10100101-01111101-00000010 287// CHECK-INST: fadd za.h[w11, 2, vgx4], { z8.h - z11.h } 288// CHECK-ENCODING: [0x02,0x7d,0xa5,0xc1] 289// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 290// CHECK-UNKNOWN: c1a57d02 <unknown> 291 292fadd za.h[w9, 7, vgx4], {z12.h - z15.h} // 11000001-10100101-00111101-10000111 293// CHECK-INST: fadd za.h[w9, 7, vgx4], { z12.h - z15.h } 294// CHECK-ENCODING: [0x87,0x3d,0xa5,0xc1] 295// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 296// CHECK-UNKNOWN: c1a53d87 <unknown> 297 298fadd za.h[w9, 7], {z12.h - z15.h} // 11000001-10100101-00111101-10000111 299// CHECK-INST: fadd za.h[w9, 7, vgx4], { z12.h - z15.h } 300// CHECK-ENCODING: [0x87,0x3d,0xa5,0xc1] 301// CHECK-ERROR: instruction requires: sme-f16f16 or sme-f8f16 302// CHECK-UNKNOWN: c1a53d87 <unknown> 303