[all-commits] [llvm/llvm-project] d298ac: [X86] Don't disable xsave when avx is disabled. Im...
topperc via All-commits
all-commits at lists.llvm.org
Fri Jun 26 16:47:39 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: d298acde828f4abc5e7c82ba1f6092890d910097
https://github.com/llvm/llvm-project/commit/d298acde828f4abc5e7c82ba1f6092890d910097
Author: Craig Topper <craig.topper at intel.com>
Date: 2020-06-26 (Fri, 26 Jun 2020)
Changed paths:
M clang/lib/Basic/Targets/X86.cpp
M clang/test/CodeGen/attr-target-x86.c
Log Message:
-----------
[X86] Don't disable xsave when avx is disabled. Implicitly enable xsave with avx is enabled and xsave wasn't explciitly disabled
CPUs with avx always have xsave, but some CPUs without avx also
have xsave. So we shouldn't disable xsave just because avx is
disabled. This would prevent xsave from being enabled with
-march=native on CPUs with xsave and not avx.
But we also don't want -mavx -mno-avx to leave xsave eanabled.
So only enable xsave if avx is enabled after processing all features.
I thought about just not turning xsave on with avx at all, but
there might be someone out there depending on it.
More information about the All-commits
mailing list