diff options
author | Eli Friedman <efriedma@quicinc.com> | 2025-07-03 13:44:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-03 13:44:38 -0700 |
commit | 2aa0f0a3bd541278b04efcc717e7aa94ef4c1308 (patch) | |
tree | bad6cb83b2366c8e0ae9e46cd18f4187a460c5f6 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 3c13257f32f5669510860f5f40851e28270f36b3 (diff) | |
download | llvm-2aa0f0a3bd541278b04efcc717e7aa94ef4c1308.zip llvm-2aa0f0a3bd541278b04efcc717e7aa94ef4c1308.tar.gz llvm-2aa0f0a3bd541278b04efcc717e7aa94ef4c1308.tar.bz2 |
[AArch64] Add option -msve-streaming-vector-bits= . (#144611)
This is similar to -msve-vector-bits, but for streaming mode: it
constrains the legal values of "vscale", allowing optimizations based on
that constraint.
This also fixes conversions between SVE vectors and fixed-width vectors
in streaming functions with -msve-vector-bits and
-msve-streaming-vector-bits.
This rejects any use of arm_sve_vector_bits types in streaming
functions; if it becomes relevant, we could add
arm_sve_streaming_vector_bits types in the future.
This doesn't touch the __ARM_FEATURE_SVE_BITS define.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 0a9e364..9b3200b 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -4620,6 +4620,11 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, if (StringRef(A->getValue()).getAsInteger(10, VScaleMin) || VScaleMin == 0) Diags.Report(diag::err_cc1_unbounded_vscale_min); } + if (Arg *A = Args.getLastArg(options::OPT_mvscale_streaming_min_EQ)) { + unsigned VScaleMin; + if (StringRef(A->getValue()).getAsInteger(10, VScaleMin) || VScaleMin == 0) + Diags.Report(diag::err_cc1_unbounded_vscale_min); + } if (const Arg *A = Args.getLastArg(OPT_frandomize_layout_seed_file_EQ)) { std::ifstream SeedFile(A->getValue(0)); |