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