aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2023-08-25 20:56:25 -0700
committerFangrui Song <i@maskray.me>2023-08-25 20:56:25 -0700
commit27da15381cbe2ac6fd1319f6409dbbab9a857b7b (patch)
tree7ddb526b8d321736684bffb84c0fcd53efa3e371 /llvm/lib/CodeGen/CodeGenPrepare.cpp
parent9de3b35ac9159d5bae6e6796cb91e4f877a07189 (diff)
downloadllvm-27da15381cbe2ac6fd1319f6409dbbab9a857b7b.zip
llvm-27da15381cbe2ac6fd1319f6409dbbab9a857b7b.tar.gz
llvm-27da15381cbe2ac6fd1319f6409dbbab9a857b7b.tar.bz2
[X86] __builtin_cpu_supports: support x86-64{,-v2,-v3,-v4}
GCC 12 (https://gcc.gnu.org/PR101696) allows __builtin_cpu_supports("x86-64") (and -v2 -v3 -v4). This patch ports the feature. * Add `FEATURE_X86_64_{BASELINE,V2,V3,V4}` to enum ProcessorFeatures, but keep CPU_FEATURE_MAX unchanged to make FeatureInfos/FeatureInfos_WithPLUS happy. * Change validateCpuSupports to allow `x86-64{,-v2,-v3,-v4}` * Change getCpuSupportsMask to return `std::array<uint32_t, 4>` where `x86-64{,-v2,-v3,-v4}` set bits `FEATURE_X86_64_{BASELINE,V2,V3,V4}`. * `target("x86-64")` and `cpu_dispatch(x86_64)` are invalid. Tested by commit 9de3b35ac9159d5bae6e6796cb91e4f877a07189 Close https://github.com/llvm/llvm-project/issues/59961 Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D158811
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
0 files changed, 0 insertions, 0 deletions