aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Widmer <shadow@umbrox.de>2013-08-27 17:24:37 +0000
committerUros Bizjak <uros@gcc.gnu.org>2013-08-27 19:24:37 +0200
commit992592ec7a83b1001cf88633fae88d92f8dba79c (patch)
tree793126886fa5cc9be9c2c5988dd901757e879112
parent9116eb22e40a1b87b603bccf96e0b4add7b09a3b (diff)
downloadgcc-992592ec7a83b1001cf88633fae88d92f8dba79c.zip
gcc-992592ec7a83b1001cf88633fae88d92f8dba79c.tar.gz
gcc-992592ec7a83b1001cf88633fae88d92f8dba79c.tar.bz2
re PR target/57927 (-march=core-avx2 different than -march=native on INTEL Haswell (i7-4700K))
PR target/57927 * config/i386/driver-i386.c (host_detect_local_cpu): Add detection of Ivy Bridge and Haswell processors. Assume core-avx2 for unknown AVX2 capable processors. From-SVN: r202026
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/driver-i386.c28
2 files changed, 25 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 902293b..9698dc9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2013-08-27 Christian Widmer <shadow@umbrox.de>
+
+ PR target/57927
+ * config/i386/driver-i386.c (host_detect_local_cpu): Add detection
+ of Ivy Bridge and Haswell processors. Assume core-avx2 for unknown
+ AVX2 capable processors.
+
2013-08-27 Tejas Belagod <tejas.belagod@arm.com>
* config/aarch64/arm_neon.h: Replace all inline asm implementations
diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c
index ee7ed23..001d12f 100644
--- a/gcc/config/i386/driver-i386.c
+++ b/gcc/config/i386/driver-i386.c
@@ -644,13 +644,18 @@ const char *host_detect_local_cpu (int argc, const char **argv)
/* Atom. */
cpu = "atom";
break;
+ case 0x0f:
+ /* Merom. */
+ case 0x17:
+ case 0x1d:
+ /* Penryn. */
+ cpu = "core2";
+ break;
case 0x1a:
case 0x1e:
case 0x1f:
case 0x2e:
/* Nehalem. */
- cpu = "corei7";
- break;
case 0x25:
case 0x2c:
case 0x2f:
@@ -662,20 +667,23 @@ const char *host_detect_local_cpu (int argc, const char **argv)
/* Sandy Bridge. */
cpu = "corei7-avx";
break;
- case 0x17:
- case 0x1d:
- /* Penryn. */
- cpu = "core2";
+ case 0x3a:
+ case 0x3e:
+ /* Ivy Bridge. */
+ cpu = "core-avx-i";
break;
- case 0x0f:
- /* Merom. */
- cpu = "core2";
+ case 0x3c:
+ /* Haswell. */
+ cpu = "core-avx2";
break;
default:
if (arch)
{
/* This is unknown family 0x6 CPU. */
- if (has_avx)
+ if (has_avx2)
+ /* Assume Haswell. */
+ cpu = "core-avx2";
+ else if (has_avx)
/* Assume Sandy Bridge. */
cpu = "corei7-avx";
else if (has_sse4_2)