diff --git a/lib/Target/AArch64/SMEInstrFormats.td b/lib/Target/AArch64/SMEInstrFormats.td index 62089166f4b..00fd374587b 100644 --- a/lib/Target/AArch64/SMEInstrFormats.td +++ b/lib/Target/AArch64/SMEInstrFormats.td @@ -480,7 +480,7 @@ multiclass sme_vector_to_tile_aliases { def : InstAlias<"mov\t$ZAd[$Rv, $imm], $Pg/m, $Zn", - (inst tile_ty:$ZAd, MatrixIndexGPR32Op12_15:$Rv, imm0_15:$imm, PPR3bAny:$Pg, zpr_ty:$Zn), 1>; + (inst tile_ty:$ZAd, MatrixIndexGPR32Op12_15:$Rv, imm_ty:$imm, PPR3bAny:$Pg, zpr_ty:$Zn), 1>; } multiclass sme_vector_v_to_tile { diff --git a/test/MC/AArch64/SME/mova-diagnostics.s b/test/MC/AArch64/SME/mova-diagnostics.s index 119a6b170af..f09ec110f69 100644 --- a/test/MC/AArch64/SME/mova-diagnostics.s +++ b/test/MC/AArch64/SME/mova-diagnostics.s @@ -158,6 +158,31 @@ mova z0.q, p0/m, za0h.q[w12, #0] // CHECK-NEXT: mova z0.q, p0/m, za0h.q[w12, #0] // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: +mov z0.b, p0/m, za0h.b[w12, #16] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]. +// CHECK-NEXT: mov z0.b, p0/m, za0h.b[w12, #16] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +mov z0.h, p0/m, za0h.h[w12, #8] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]. +// CHECK-NEXT: mov z0.h, p0/m, za0h.h[w12, #8] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +mov z0.s, p0/m, za0h.s[w12, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 3]. +// CHECK-NEXT: mov z0.s, p0/m, za0h.s[w12, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +mov z0.d, p0/m, za0h.d[w12, #2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 1]. +// CHECK-NEXT: mov z0.d, p0/m, za0h.d[w12, #2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +mov z0.q, p0/m, za0h.q[w12, #0] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: mov z0.q, p0/m, za0h.q[w12, #0] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + // vector-to-tile mova za0h.b[w12, #16], p0/m, z0.b @@ -185,6 +210,31 @@ mova za0h.q[w12, #0], p0/m, z0.q // CHECK-NEXT: mova za0h.q[w12, #0], p0/m, z0.q // CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: +mov za0h.b[w12, #16], p0/m, z0.b +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 15]. +// CHECK-NEXT: mov za0h.b[w12, #16], p0/m, z0.b +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +mov za0h.h[w12, #8], p0/m, z0.h +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 7]. +// CHECK-NEXT: mov za0h.h[w12, #8], p0/m, z0.h +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +mov za0h.s[w12, #4], p0/m, z0.s +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 3]. +// CHECK-NEXT: mov za0h.s[w12, #4], p0/m, z0.s +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +mov za0h.d[w12, #2], p0/m, z0.d +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [0, 1]. +// CHECK-NEXT: mov za0h.d[w12, #2], p0/m, z0.d +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +mov za0h.q[w12, #0], p0/m, z0.q +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: mov za0h.q[w12, #0], p0/m, z0.q +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + // ------------------------------------------------------------------------- // // Invalid ZPR element width