1// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s 2 3// --------------------------------------------------------------------------// 4// Immediate out of lower bound [-16, 15]. 5 6index z27.b, #-17, #-16 7// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15]. 8// CHECK-NEXT: index z27.b, #-17, #-16 9// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 10 11index z11.h, #-16, #-17 12// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15]. 13// CHECK-NEXT: index z11.h, #-16, #-17 14// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 15 16index z2.s, #16, #-16 17// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15]. 18// CHECK-NEXT: index z2.s, #16, #-16 19// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 20 21index z2.d, #-16, #16 22// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15]. 23// CHECK-NEXT: index z2.d, #-16, #16 24// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 25 26index z4.b, #-17, w28 27// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15]. 28// CHECK-NEXT: index z4.b, #-17, w28 29// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 30 31index z9.h, #16, w23 32// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15]. 33// CHECK-NEXT: index z9.h, #16, w23 34// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 35 36index z3.s, w10, #-17 37// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15]. 38// CHECK-NEXT: index z3.s, w10, #-17 39// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 40 41index z17.d, x9, #16 42// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15]. 43// CHECK-NEXT: index z17.d, x9, #16 44// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 45 46 47// --------------------------------------------------------------------------// 48// Invalid register 49 50index z17.s, x9, w7 51// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15]. 52// CHECK-NEXT: index z17.s, x9, w7 53// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 54 55index z17.d, w9, w7 56// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: index must be an integer in range [-16, 15]. 57// CHECK-NEXT: index z17.d, w9, w7 58// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 59 60 61// --------------------------------------------------------------------------// 62// Negative tests for instructions that are incompatible with movprfx 63 64movprfx z21.d, p0/z, z28.d 65index z21.d, x10, x21 66// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov 67// CHECK-NEXT: index z21.d, x10, x21 68// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 69 70movprfx z21, z28 71index z21.d, x10, x21 72// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov 73// CHECK-NEXT: index z21.d, x10, x21 74// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 75 76movprfx z23.d, p0/z, z30.d 77index z23.d, x13, #8 78// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov 79// CHECK-NEXT: index z23.d, x13, #8 80// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 81 82movprfx z23, z30 83index z23.d, x13, #8 84// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov 85// CHECK-NEXT: index z23.d, x13, #8 86// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 87 88movprfx z23.d, p0/z, z30.d 89index z23.d, #13, x8 90// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov 91// CHECK-NEXT: index z23.d, #13, x8 92// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 93 94movprfx z23, z30 95index z23.d, #13, x8 96// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov 97// CHECK-NEXT: index z23.d, #13, x8 98// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 99