Fixed x86-64 optimization flags for clang#13913
Conversation
Before the flags used where the one for llc, the underlying compiler from LLVM IR to machine assembly. It turns out that the semantic of `-march`, `-mtune` and `-mcpu` changes from clang front-end to llc. I found no definitive reference for the flags submitted in this PR, but I checked the assembly on a vectorizable function using Godbolt's web-site.
|
@alalazo This also causes a spurious configuration failure when building cmake because it generates a |
|
@hainest Is there any |
|
@hainest On those architectures as far as I know, |
|
@hainest By the way, are you talking about Clang or GCC? |
I just tested with gcc-8.3 and clang-8 on ARM and gcc-7.3 and clang-9 on Power9 and confirmed that are not deprecated there. That is a rather interesting decision on their part. No changes needed, then. |
|
I still have on my TODO list another PR to fix Clang's flags for |
|
That's probably a good idea. Keeping the usage uniform across compilers will make adding new architectures less treacherous. |
Same as spack#13913, just for ppc
Same as spack#13913, just for ppc
Before the flags used where the one for llc, the underlying compiler from LLVM IR to machine assembly. It turns out that the semantic of
-march,-mtuneand-mcpuchanges from clang front-end to llc.I found no definitive reference for the flags submitted in this PR, but I checked the assembly on a vectorizable function using Godbolt's web-site.
Refers to the discussion in #13825 (comment) (thanks @t-karatsu !)