Skip to content
Unverified Commit 8a584079 authored by Phoebe Wang's avatar Phoebe Wang Committed by GitHub
Browse files

[X86][EVEX512] Restrict attaching EVEX512 for default CPU only, NFCI (#65920)

Attaching EVEX512 is used to provide backward compatibility for legacy
LLVM IR files, which didn't set EVEX512 feature explicitly.

AVX512 and AVX10 targets have set or unset EVEX512 properly through
X86.td.

However, it's not feasible to list all AVX512 and AVX10 targets or their
complementary set here to skip/restrict such code.

Instead, we can restrict it for default CPU only. "generic" is used when
"target-cpu" is not specified in IR, while "pentium4" and "x86-64" is
the default CPU if "-march" is not specified in Clang for 32-bit and
64-bit targets respectively.

This patch is no functional change intended, though it might affect
scenarios like "-march=broadwell -mavx512bw", which looks like a misuse
of "-march" and can be solved by changing to "-mtune=broadwell
-mavx512bw".
parent 1d8a94c4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment