[X86] Add support for -mvzeroupper and -mno-vzeroupper to match gcc
authorCraig Topper <craig.topper@intel.com>
Mon, 4 Nov 2019 18:20:00 +0000 (10:20 -0800)
committerCraig Topper <craig.topper@intel.com>
Mon, 4 Nov 2019 19:03:54 +0000 (11:03 -0800)
commitb2b6a54f847f33f821f41e3e82bf3b86e08817a0
tree2f8236709521bf9e38b891250003e0a43b73864c
parent6ff439b57f0fc2b1a2193ae37637c531ff652b1c
[X86] Add support for -mvzeroupper and -mno-vzeroupper to match gcc

-mvzeroupper will force the vzeroupper insertion pass to run on
CPUs that normally wouldn't. -mno-vzeroupper disables it on CPUs
where it normally runs.

To support this with the default feature handling in clang, we
need a vzeroupper feature flag in X86.td. Since this flag has
the opposite polarity of the fast-partial-ymm-or-zmm-write we
used to use to disable the pass, we now need to add this new
flag to every CPU except KNL/KNM and BTVER2 to keep identical
behavior.

Remove -fast-partial-ymm-or-zmm-write which is no longer used.

Differential Revision: https://reviews.llvm.org/D69786
clang/docs/ReleaseNotes.rst
clang/include/clang/Driver/Options.td
clang/test/Driver/x86-target-features.c
llvm/docs/ReleaseNotes.rst
llvm/lib/Target/X86/X86.td
llvm/lib/Target/X86/X86Subtarget.h
llvm/lib/Target/X86/X86TargetTransformInfo.h
llvm/lib/Target/X86/X86VZeroUpper.cpp
llvm/test/CodeGen/X86/avx-vzeroupper.ll