1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[AArch64][SME] Fix imm bug in mov vector to tile aliases

Also fixes a warning mentioned in D109359.

Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D109363

(cherry picked from commit 89786c2b992c3cb4c4a230542d2af34ec2915a08)
This commit is contained in:
Cullen Rhodes 2021-09-07 14:36:10 +00:00 committed by Tom Stellard
parent 921995afd5
commit 5f6ef6fbfd
2 changed files with 51 additions and 1 deletions

View File

@ -480,7 +480,7 @@ multiclass sme_vector_to_tile_aliases<Instruction inst,
MatrixTileVectorOperand tile_ty,
ZPRRegOp zpr_ty, Operand imm_ty> {
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<string mnemonic, bit is_col> {

View File

@ -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