[PATCH] D46688: [AArch64][SVE] Improve diagnostics for vectors with incorrect element-size.

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 10 04:59:26 PDT 2018


sdesmalen added inline comments.


================
Comment at: test/MC/AArch64/SVE/ld1b-diagnostics.s:118
 ld1b z0.d, p0/z, [x0, z0.b]
-// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid shift/extend specified, expected 'z[0..31].d, (uxtw|sxtw)'
+// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand
 // CHECK-NEXT: ld1b z0.d, p0/z, [x0, z0.b]
----------------
SjoerdMeijer wrote:
> Is this a regression? Is the old diagnostic more accurate? If so, can we avoid this regression? There is quite a few of them below.
It is, but a conscious one. I tried to explain it a bit in the description of the patch, but I can understand this may not have been very clear :)
This regression is a trade-off to get better diagnostics for the prefetches. We could avoid the regression if we create new operand classes for each shift/extend where it makes the distinction between "both z0.s and z0.d are allowed in this position", and "only z0.d is allowed". That way, the assembler can make the choice what diagnostic to emit. However, I think that would (over)complicate the operand classes.
Please have a second look at the commit message to see some examples of this trade-off and let me know what you think is the best way forward.


https://reviews.llvm.org/D46688





More information about the llvm-commits mailing list