aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2023-08-03 08:12:00 -0700
committerCraig Topper <craig.topper@sifive.com>2023-08-03 08:12:01 -0700
commit2a5e3f4c6c2cdd2aab55fbfdb703ca8163351ea9 (patch)
tree0aaa73790f5b3aaa140d9561cc4ccc3785ebba43 /clang/lib/Frontend/CompilerInvocation.cpp
parent165f45a877742a74988d63f36aee635c8e0a47da (diff)
downloadllvm-2a5e3f4c6c2cdd2aab55fbfdb703ca8163351ea9.zip
llvm-2a5e3f4c6c2cdd2aab55fbfdb703ca8163351ea9.tar.gz
llvm-2a5e3f4c6c2cdd2aab55fbfdb703ca8163351ea9.tar.bz2
[X86] Workaround possible CPUID bug in Sandy Bridge.
Don't access leaf 7 subleaf 1 unless subleaf 0 says it is supported via EAX. Intel documentation says invalid subleaves return 0. We had been relying on that behavior instead of checking the max sublef number. It appears that some Sandy Bridge CPUs return at least the subleaf 0 EDX value for subleaf 1. Best guess is that this is a bug in a microcode patch since all of the bits we're seeing set in EDX were introduced after Sandy Bridge was originally released. This is causing avxvnniint16 to be incorrectly enabled with -march=native on these CPUs. Reviewed By: pengfei, anna Differential Revision: https://reviews.llvm.org/D156963
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions