[PATCH, i386] PR 57927: -march=core-avx2 different than -march=native on INTEL Haswell (i7-4700K)
H.J. Lu
hjl.tools@gmail.com
Tue Aug 27 18:12:00 GMT 2013
On Tue, Aug 27, 2013 at 10:41 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Tue, Aug 27, 2013 at 7:36 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>
>>>> As reported in [1] the host processor detection has not yet been updated
>>>> to recognize Intel Ivy Bridge and Haswell processors.
>>>> This small patch adds the detection of these processors and assumes
>>>> core-avx2 as march for unknown processors of the PENTIUMPRO family that
>>>> support AVX2.
>>>
>>> I have committed slightly improved (attached) patch that uses
>>> core-avx-i for IvyBridge and adds another IvyBridge model number.
>>> While there, I also reordered a bunch of statements.
>>>
>>> Thanks,
>>> Uros.
>>
>> Page C-3 in ntel optimization guide shows:
>>
>> 06_3CH, 06_45H, 06_46H Intel microarchitecture Haswell
>> 06_3AH, 06_3EH Intel microarchitecture Ivy Bridge
>> 06_2AH, 06_2DH Intel microarchitecture Sandy Bridge
>> 06_25H, 06_2CH, 06_2FH Intel microarchitecture Westmere
>> 06_1AH, 06_1EH, 06_1FH, Intel microarchitecture Nehalem
>> 06_2EH
>> 06_17H, 06_1DH Enhanced Intel Core microarchitecture
>> 06_0FH Intel Core microarchitecture
>>
>> At least, we should add 0x45 and 0x46 to Haswell.
>
> OK, the patch is pre-approved.
>
This is what I checked in.
Thanks.
--
H.J.
---
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9698dc9..54a4cf9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2013-08-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/driver-i386.c (host_detect_local_cpu): Update
+ Haswell processor detection.
+
2013-08-27 Christian Widmer <shadow@umbrox.de>
PR target/57927
diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c
index 001d12f..4cb9907 100644
--- a/gcc/config/i386/driver-i386.c
+++ b/gcc/config/i386/driver-i386.c
@@ -673,6 +673,8 @@ const char *host_detect_local_cpu (int argc, const
char **argv)
cpu = "core-avx-i";
break;
case 0x3c:
+ case 0x45:
+ case 0x46:
/* Haswell. */
cpu = "core-avx2";
break;
More information about the Gcc-patches
mailing list