diff options
author | Cullen Rhodes <cullen.rhodes@arm.com> | 2021-12-07 09:20:42 +0000 |
---|---|---|
committer | Cullen Rhodes <cullen.rhodes@arm.com> | 2021-12-07 09:52:21 +0000 |
commit | 698584f89b8f8bd7f6c2d2cd61efb5548857da2a (patch) | |
tree | b8c205bc3f0758b5230d728b0a3148b42b0d96eb /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 978431e80b6155878d8d5b4fc7a67c90af317c01 (diff) | |
download | llvm-698584f89b8f8bd7f6c2d2cd61efb5548857da2a.zip llvm-698584f89b8f8bd7f6c2d2cd61efb5548857da2a.tar.gz llvm-698584f89b8f8bd7f6c2d2cd61efb5548857da2a.tar.bz2 |
[IR] Remove unbounded as possible value for vscale_range minimum
The default for min is changed to 1. The behaviour of -mvscale-{min,max}
in Clang is also changed such that 16 is the max vscale when targeting
SVE and no max is specified.
Reviewed By: sdesmalen, paulwalker-arm
Differential Revision: https://reviews.llvm.org/D113294
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index c104a6f..f760eb2 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -4123,6 +4123,13 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, {std::string(Split.first), std::string(Split.second)}); } + // Error if -mvscale-min is unbounded. + if (Arg *A = Args.getLastArg(options::OPT_mvscale_min_EQ)) { + unsigned VScaleMin; + if (StringRef(A->getValue()).getAsInteger(10, VScaleMin) || VScaleMin == 0) + Diags.Report(diag::err_cc1_unbounded_vscale_min); + } + return Diags.getNumErrors() == NumErrorsBefore; } |