1// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+sve 2>&1 < %s| FileCheck %s 2 3 4// ------------------------------------------------------------------------- // 5// Invalid predicate 6 7clastb w0, p8, w0, z31.b 8// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: restricted predicate has range [0, 7]. 9// CHECK-NEXT: clastb w0, p8, w0, z31.b 10// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 11 12 13// ------------------------------------------------------------------------- // 14// Invalid element width 15 16clastb w0, p7, x0, z31.b 17// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand 18// CHECK-NEXT: clastb w0, p7, x0, z31.b 19// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 20 21clastb x0, p7, x0, z31.b 22// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 23// CHECK-NEXT: clastb x0, p7, x0, z31.b 24// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 25 26clastb x0, p7, x0, z31.h 27// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 28// CHECK-NEXT: clastb x0, p7, x0, z31.h 29// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 30 31clastb x0, p7, x0, z31.s 32// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 33// CHECK-NEXT: clastb x0, p7, x0, z31.s 34// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 35 36clastb w0, p7, w0, z31.d 37// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 38// CHECK-NEXT: clastb w0, p7, w0, z31.d 39// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 40 41clastb b0, p7, b0, z31.h 42// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 43// CHECK-NEXT: clastb b0, p7, b0, z31.h 44// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 45 46clastb h0, p7, h0, z31.s 47// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 48// CHECK-NEXT: clastb h0, p7, h0, z31.s 49// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 50 51clastb s0, p7, s0, z31.d 52// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 53// CHECK-NEXT: clastb s0, p7, s0, z31.d 54// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 55 56clastb d0, p7, d0, z31.b 57// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 58// CHECK-NEXT: clastb d0, p7, d0, z31.b 59// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 60 61clastb z0.b, p7, z0.b, z31.h 62// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 63// CHECK-NEXT: clastb z0.b, p7, z0.b, z31.h 64// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 65 66clastb z0.h, p7, z0.h, z31.s 67// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 68// CHECK-NEXT: clastb z0.h, p7, z0.h, z31.s 69// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 70 71clastb z0.s, p7, z0.s, z31.d 72// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 73// CHECK-NEXT: clastb z0.s, p7, z0.s, z31.d 74// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 75 76clastb z0.d, p7, z0.d, z31.b 77// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid element width 78// CHECK-NEXT: clastb z0.d, p7, z0.d, z31.b 79// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 80 81 82// --------------------------------------------------------------------------// 83// Negative tests for instructions that are incompatible with movprfx 84 85movprfx z31.d, p7/z, z6.d 86clastb x0, p7, x0, z31.d 87// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov 88// CHECK-NEXT: clastb x0, p7, x0, z31.d 89// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 90 91movprfx z31, z6 92clastb x0, p7, x0, z31.d 93// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov 94// CHECK-NEXT: clastb x0, p7, x0, z31.d 95// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 96 97movprfx z31.d, p7/z, z6.d 98clastb d0, p7, d0, z31.d 99// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov 100// CHECK-NEXT: clastb d0, p7, d0, z31.d 101// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 102 103movprfx z31, z6 104clastb d0, p7, d0, z31.d 105// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a movprfx, suggest replacing movprfx with mov 106// CHECK-NEXT: clastb d0, p7, d0, z31.d 107// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 108 109movprfx z0.d, p7/z, z7.d 110clastb z0.d, p7, z0.d, z31.d 111// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: instruction is unpredictable when following a predicated movprfx, suggest using unpredicated movprfx 112// CHECK-NEXT: clastb z0.d, p7, z0.d, z31.d 113// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: 114