[all-commits] [llvm/llvm-project] 8a5840: [X86][EVEX512] Restrict attaching EVEX512 for defa...

Phoebe Wang via All-commits all-commits at lists.llvm.org
Sun Sep 10 21:49:49 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8a584079de31497e0126179052cf5427b189bf60
      https://github.com/llvm/llvm-project/commit/8a584079de31497e0126179052cf5427b189bf60
  Author: Phoebe Wang <phoebe.wang at intel.com>
  Date:   2023-09-11 (Mon, 11 Sep 2023)

  Changed paths:
    M llvm/lib/Target/X86/X86Subtarget.cpp

  Log Message:
  -----------
  [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".




More information about the All-commits mailing list