[PATCH] [PATCH][X86] Slightly refactor default features for AMD bdver* cpus. Also improve checks for target features in test Preprocessor/predefined-arch-macros.c.

Craig Topper craig.topper at gmail.com
Wed Nov 5 13:11:05 PST 2014

Why have avx, fma4, and sse4a been added to CK_BDVER1? xop implies all of
those. Can we use comments instead?

On Wed, Nov 5, 2014 at 9:21 AM, Andrea Di Biagio <
Andrea_DiBiagio at sn.scee.net> wrote:

> Hi rnk, craig.topper, qcolombet,
> Hi Reid, Quentin (and all),
> This patch slightly refactors how clang sets default features for AMD
> bdver cpus.
> Method 'getDefaultFeatures' (in Basic/Targets.cpp), already uses a
> fallthrough mechanism to set default features for 'bdver4', bdver3 and
> bdver2. This patch simply adds another 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 etc.
> While at it, I added missing checks for features in test
> predefined-arch-macros.c.
> In the case of BTVER2, this patch adds explicit checks for __F16C__,
> __BMI__ and __PCLMUL__.
> In the case of BDVER3 and BDVER4, this patch checks for the presence of
> __FSGSBASE__ (added at r221130).
> Please let me know if ok to submit.
> Thanks,
> Andrea
> http://reviews.llvm.org/D6134
> Files:
>   lib/Basic/Targets.cpp
>   test/Preprocessor/predefined-arch-macros.c

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141105/c4bc6dc9/attachment.html>

More information about the cfe-commits mailing list