1// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s 2 3// ------------------------------------------------------------------------- // 4// Invalid result register 5 6incw w0 7// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand 8// CHECK-NEXT: incw w0 9// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 10 11incw sp 12// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand 13// CHECK-NEXT: incw sp 14// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 15 16// incw requires z0.s 17incw z0.d 18// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 19// CHECK-NEXT: incw z0.d 20// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 21 22 23// ------------------------------------------------------------------------- // 24// Immediate not compatible with encode/decode function. 25 26incw x0, all, mul #-1 27// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16] 28// CHECK-NEXT: incw x0, all, mul #-1 29// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 30 31incw x0, all, mul #0 32// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16] 33// CHECK-NEXT: incw x0, all, mul #0 34// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 35 36incw x0, all, mul #17 37// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [1, 16] 38// CHECK-NEXT: incw x0, all, mul #17 39// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 40 41 42// ------------------------------------------------------------------------- // 43// Invalid predicate patterns 44 45incw x0, vl512 46// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand 47// CHECK-NEXT: incw x0, vl512 48// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 49 50incw x0, vl9 51// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand 52// CHECK-NEXT: incw x0, vl9 53// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 54 55incw x0, #-1 56// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate pattern 57// CHECK-NEXT: incw x0, #-1 58// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 59 60incw x0, #32 61// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate pattern 62// CHECK-NEXT: incw x0, #32 63// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 64 65 66// --------------------------------------------------------------------------// 67// Negative tests for instructions that are incompatible with movprfx 68 69movprfx z0.s, p0/z, z7.s 70incw z0.s 71// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx 72// CHECK-NEXT: incw z0.s 73// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 74 75movprfx z0.s, p0/z, z7.s 76incw z0.s, all, mul #16 77// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx 78// CHECK-NEXT: incw z0.s, all, mul #16 79// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 80 81movprfx z0.s, p0/z, z7.s 82incw z0.s, all 83// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx 84// CHECK-NEXT: incw z0.s, all 85// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 86