[Bug target/57927] -march=core-avx2 different than -march=native on INTEL Haswell (i7-4700K)

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jul 18 19:53:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57927

--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
gcc/config/i386/driver-i386.c host processor detection apparently hasn't been
updated for those recent processors yet. You could look for this code:

        case 0x2d:
          /* Sandy Bridge.  */
          cpu = "corei7-avx";
          break;

and add nearby:

        case 0x3a:
          /* Ivy Bridge.  */
          cpu = "core-avx2";
          break;

Also, a few lines below, before "if (has_avx)", one could test has_avx2 and use
core-avx2 as a default in that case.



More information about the Gcc-bugs mailing list