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