[X86] Honor command line features along with cpu_specific attribute
authorCraig Topper <craig.topper@sifive.com>
Thu, 11 Nov 2021 16:37:11 +0000 (08:37 -0800)
committerCraig Topper <craig.topper@sifive.com>
Thu, 11 Nov 2021 17:06:22 +0000 (09:06 -0800)
commit893efd0d665becb3478c750b2b4d3751c20ff39d
tree1f7eff14585983b78b17ccd154a54a4ccf1865ef
parentda4822f6c81597d9d6bf68c11d7fd98d37c1b1ea
[X86] Honor command line features along with cpu_specific attribute

If the feature is on the command line we should honor it for all
functions. I don't think we could reliably target a single function
for a less capable processor than what the rest of the program is
compiled for.

Fixes PR52407.

Reviewed By: erichkeane

Differential Revision: https://reviews.llvm.org/D113647
clang/lib/AST/ASTContext.cpp
clang/test/CodeGen/attr-cpuspecific-avx-abi.c [new file with mode: 0644]