1// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 2>&1 < %s| FileCheck %s 2 3// --------------------------------------------------------------------------// 4// Restricted predicate out of range. 5 6match p0.b, p8/z, z0.b, z0.b 7// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid restricted predicate register, expected p0..p7 (without element suffix) 8// CHECK-NEXT: match p0.b, p8/z, z0.b, z0.b 9// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 10 11 12// --------------------------------------------------------------------------// 13// Invalid predicate operation 14 15match p0.b, p0/m, z0.b, z0.b 16// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction 17// CHECK-NEXT: match p0.b, p0/m, z0.b, z0.b 18// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 19 20 21// --------------------------------------------------------------------------// 22// Invalid destination predicate register 23 24match p0.s, p0/z, z0.b, z0.b 25// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate register. 26// CHECK-NEXT: match p0.s, p0/z, z0.b, z0.b 27// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 28 29match p0.d, p0/z, z0.b, z0.b 30// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid predicate register. 31// CHECK-NEXT: match p0.d, p0/z, z0.b, z0.b 32// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 33 34// --------------------------------------------------------------------------// 35// Invalid element width 36 37match p0.b, p0/z, z0.s, z0.s 38// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 39// CHECK-NEXT: match p0.b, p0/z, z0.s, z0.s 40// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 41 42match p0.b, p0/z, z0.d, z0.d 43// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 44// CHECK-NEXT: match p0.b, p0/z, z0.d, z0.d 45// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 46 47 48// --------------------------------------------------------------------------// 49// Negative tests for instructions that are incompatible with movprfx 50 51movprfx z0.b, p0/z, z7.b 52match p0.b, p0/z, z0.b, z0.b 53// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov 54// CHECK-NEXT: match p0.b, p0/z, z0.b, z0.b 55// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 56 57movprfx z0, z7 58match p0.b, p0/z, z0.b, z0.b 59// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov 60// CHECK-NEXT: match p0.b, p0/z, z0.b, z0.b 61// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 62