1// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s 2 3sli z18.b, z28.b, #-1 4// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7] 5// CHECK-NEXT: sli z18.b, z28.b, #-1 6// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 7 8sli z1.b, z9.b, #8 9// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7] 10// CHECK-NEXT: sli z1.b, z9.b, #8 11// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 12 13sli z21.h, z2.h, #-1 14// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15] 15// CHECK-NEXT: sli z21.h, z2.h, #-1 16// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 17 18sli z14.h, z30.h, #16 19// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15] 20// CHECK-NEXT: sli z14.h, z30.h, #16 21// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 22 23sli z6.s, z12.s, #-1 24// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31] 25// CHECK-NEXT: sli z6.s, z12.s, #-1 26// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 27 28sli z23.s, z19.s, #32 29// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 31] 30// CHECK-NEXT: sli z23.s, z19.s, #32 31// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 32 33sli z3.d, z24.d, #-1 34// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 63] 35// CHECK-NEXT: sli z3.d, z24.d, #-1 36// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 37 38sli z25.d, z16.d, #64 39// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 63] 40// CHECK-NEXT: sli z25.d, z16.d, #64 41// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 42 43 44// --------------------------------------------------------------------------// 45// Element sizes must match 46 47sli z0.b, z0.h, #0 48// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 49// CHECK-NEXT: sli z0.b, z0.h, #0 50// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 51 52// --------------------------------------------------------------------------// 53// Negative tests for instructions that are incompatible with movprfx 54 55movprfx z31, z6 56sli z31.d, z31.d, #63 57// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov 58// CHECK-NEXT: sli z31.d, z31.d, #63 59// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 60