[clang] [llvm] [SPARC] Consume `tune-cpu` directive in the backend (PR #77195)
Sergei Barannikov via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 8 17:16:57 PST 2024
================
@@ -5119,7 +5119,7 @@ def module_file_info : Flag<["-"], "module-file-info">, Flags<[]>,
HelpText<"Provide information about a particular module file">;
def mthumb : Flag<["-"], "mthumb">, Group<m_Group>;
def mtune_EQ : Joined<["-"], "mtune=">, Group<m_Group>,
- HelpText<"Only supported on AArch64, PowerPC, RISC-V, SystemZ, and X86">;
+ HelpText<"Only supported on AArch64, PowerPC, RISC-V, SPARC, SystemZ, and X86">;
----------------
s-barannikov wrote:
I mean that something like `--target=sparc -mtune=i386` should fail and there should be a test for that.
Currently (without this patch) it succeeds on Sparc and fails on e.g. AArch64.
```
$ clang --target=aarch64 -mtune=i386 -xc - </dev/null -S
clang: error: the clang compiler does not support '-mtune=i386'
$ clang --target=sparc -mtune=i386 -xc - </dev/null -S
(no diagnostics)
```
https://github.com/llvm/llvm-project/pull/77195
More information about the cfe-commits
mailing list