<div dir="ltr">Why have avx, fma4, and sse4a been added to CK_BDVER1? xop implies all of those. Can we use comments instead?</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 5, 2014 at 9:21 AM, Andrea Di Biagio <span dir="ltr"><<a href="mailto:Andrea_DiBiagio@sn.scee.net" target="_blank">Andrea_DiBiagio@sn.scee.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi rnk, craig.topper, qcolombet,<br>
<br>
Hi Reid, Quentin (and all),<br>
<br>
This patch slightly refactors how clang sets default features for AMD bdver cpus.<br>
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.<br>
<br>
While at it, I added missing checks for features in test predefined-arch-macros.c.<br>
In the case of BTVER2, this patch adds explicit checks for __F16C__, __BMI__ and __PCLMUL__.<br>
In the case of BDVER3 and BDVER4, this patch checks for the presence of __FSGSBASE__ (added at r221130).<br>
<br>
Please let me know if ok to submit.<br>
<br>
Thanks,<br>
Andrea<br>
<br>
<a href="http://reviews.llvm.org/D6134" target="_blank">http://reviews.llvm.org/D6134</a><br>
<br>
Files:<br>
  lib/Basic/Targets.cpp<br>
  test/Preprocessor/predefined-arch-macros.c<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">~Craig</div>
</div>