[PATCH] D111790: [AArch64][Driver][SVE] Allow -msve-vector-bits=<n>+ syntax to mean no maximum vscale
Bradley Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 15 08:03:02 PDT 2021
bsmith added inline comments.
================
Comment at: clang/lib/Sema/SemaType.cpp:7916
// The attribute vector size must match -msve-vector-bits.
- if (VecSize != S.getLangOpts().ArmSveVectorBits) {
+ if (VecSize != S.getLangOpts().VScaleMin * 128) {
S.Diag(Attr.getLoc(), diag::err_attribute_bad_sve_vector_size)
----------------
paulwalker-arm wrote:
> I'm thinking there should be a check for `S.getLangOpts().VScaleMin == S.getLangOpts().VScaleMax` somewhere, but I guess the current diagnostic probably doesn't account for two values, nor should it really. What about just duplicating this block but using `VScaleMax` in place of `VScaleMin`?
I think I would rather have a separate check for min == max, and output a diagnostic stating that an exact -msve-vector-bits value must be used, does that sound sensible?
This could then perhaps be combined with the previous comment to produce sensible output, i.e.:
!vscale_min -> not supported
vscale_min != vscale_max -> must be fixed value
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111790/new/
https://reviews.llvm.org/D111790
More information about the cfe-commits
mailing list