1// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s 2 3 4// ------------------------------------------------------------------------- // 5// z register out of range for index 6 7fmlalb z0.s, z1.h, z8.h[0] 8// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction 9// CHECK-NEXT: fmlalb z0.s, z1.h, z8.h[0] 10// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 11 12// ------------------------------------------------------------------------- // 13// Index out of bounds 14 15fmlalb z0.s, z1.h, z7.h[-1] 16// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector lane must be an integer in range [0, 7]. 17// CHECK-NEXT: fmlalb z0.s, z1.h, z7.h[-1] 18// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 19 20fmlalb z0.s, z1.h, z7.h[8] 21// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: vector lane must be an integer in range [0, 7]. 22// CHECK-NEXT: fmlalb z0.s, z1.h, z7.h[8] 23// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 24 25// ------------------------------------------------------------------------- // 26// Invalid element width 27 28fmlalb z0.s, z1.b, z2.b 29// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 30// CHECK-NEXT: fmlalb z0.s, z1.b, z2.b 31// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 32 33fmlalb z0.s, z1.s, z2.s 34// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 35// CHECK-NEXT: fmlalb z0.s, z1.s, z2.s 36// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 37 38fmlalb z0.s, z1.d, z2.d 39// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 40// CHECK-NEXT: fmlalb z0.s, z1.d, z2.d 41// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 42 43fmlalb z0.s, z1.b, z2.b[0] 44// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 45// CHECK-NEXT: fmlalb z0.s, z1.b, z2.b[0] 46// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 47 48fmlalb z0.s, z1.s, z2.s[0] 49// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 50// CHECK-NEXT: fmlalb z0.s, z1.s, z2.s[0] 51// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 52 53fmlalb z0.s, z1.d, z2.d[0] 54// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 55// CHECK-NEXT: fmlalb z0.s, z1.d, z2.d[0] 56// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 57 58// --------------------------------------------------------------------------// 59// Negative tests for instructions that are incompatible with movprfx 60 61movprfx z29.s, p0/z, z7.s 62fmlalb z29.s, z30.h, z31.h 63// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx 64// CHECK-NEXT: fmlalb z29.s, z30.h, z31.h 65// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 66 67movprfx z0.s, p0/z, z7.s 68fmlalb z0.s, z1.h, z7.h[0] 69// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx 70// CHECK-NEXT: fmlalb z0.s, z1.h, z7.h[0] 71// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 72