From: Kaelyn Takata Date: Mon, 5 May 2014 16:32:10 +0000 (+0000) Subject: Select bdver2 instead of bdver1 if TBM support is present on models < 0x10. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=54d2b3322227d58fa763f4c0666ca044aba302f4 Select bdver2 instead of bdver1 if TBM support is present on models < 0x10. Tested that the right -target-cpu is set in the clang -cc1 command line when running "clang -march=native -E -v - > 29) & 0x1; + bool HasTBM = (ECX >> 21) & 0x1; if (memcmp(text.c, "GenuineIntel", 12) == 0) { switch (Family) { @@ -439,7 +440,7 @@ StringRef sys::getHostCPUName() { return "bdver4"; // 50h-6Fh: Excavator if (Model >= 0x30) return "bdver3"; // 30h-3Fh: Steamroller - if (Model >= 0x10) + if (Model >= 0x10 || HasTBM) return "bdver2"; // 10h-1Fh: Piledriver return "bdver1"; // 00h-0Fh: Bulldozer case 22: