[X86] Slightly refactor default features for AMD bdver cpus (NFC). Also add missing...
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 6 Nov 2014 12:08:57 +0000 (12:08 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Thu, 6 Nov 2014 12:08:57 +0000 (12:08 +0000)
commit9760a44d1a3480ef17bdb052f86ee33bde830116
treee9b48e4c8ccc6f745553199845c563243e1795d3
parent73983918c45b3b2c23b871b05e44c800f4aeff59
[X86] Slightly refactor default features for AMD bdver cpus (NFC). Also add missing checks to test for target features.

This patch simplifies how default target features are set for AMD bdver2
and bdver1. In particular, method 'getDefaultFeatures' now implements a
fallthrough from case 'CK_BDVER2' to case 'CK_BDVER1'.
That is because 'bdver2' has the same features available in bdver1 plus
BMI, FMA, F16C and TBM.

This patch also adds missing checks for predefined macros in test
predefined-arch-macros.c. In the case of BTVER2, the test now also checks
for F16C, BMI and PCLMUL. In the case of BDVER3 and BDVER4, the test now
also checks for the presence of FSGSBASE.

Differential Revision: http://reviews.llvm.org/D6134

llvm-svn: 221449
clang/lib/Basic/Targets.cpp
clang/test/Preprocessor/predefined-arch-macros.c