public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95400] New: -march=native and -march=icelake-client produce different results on icelake client
@ 2020-05-29  4:06 travis.downs at gmail dot com
  2020-05-29  7:18 ` [Bug target/95400] " marxin at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: travis.downs at gmail dot com @ 2020-05-29  4:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95400

            Bug ID: 95400
           Summary: -march=native and -march=icelake-client produce
                    different results on icelake client
           Product: gcc
           Version: 9.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: travis.downs at gmail dot com
  Target Milestone: ---

On an Ice Lake client machine, using -O3 -march=native produces 512-bit AVX-512
instructions, whereas -O3 -march=icelake-client produces 256-bit instructions.

Since this machine *is* Ice Lake client, I would expect both options to do the
same thing.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/95400] -march=native and -march=icelake-client produce different results on icelake client
  2020-05-29  4:06 [Bug c++/95400] New: -march=native and -march=icelake-client produce different results on icelake client travis.downs at gmail dot com
@ 2020-05-29  7:18 ` marxin at gcc dot gnu.org
  2020-05-29 11:19 ` hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-29  7:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95400

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2020-05-29
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Can you please provide output of:

$ gcc -march=native -c /tmp/foo.c --verbose
?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/95400] -march=native and -march=icelake-client produce different results on icelake client
  2020-05-29  4:06 [Bug c++/95400] New: -march=native and -march=icelake-client produce different results on icelake client travis.downs at gmail dot com
  2020-05-29  7:18 ` [Bug target/95400] " marxin at gcc dot gnu.org
@ 2020-05-29 11:19 ` hjl.tools at gmail dot com
  2020-05-29 11:24 ` hjl.tools at gmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2020-05-29 11:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95400

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
[hjl@gnu-icl-1 gcc]$ head /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 126
model name      : Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
stepping        : 5
microcode       : 0x78
cpu MHz         : 705.337
cache size      : 8192 KB
physical id     : 0
[hjl@gnu-icl-1 gcc]$ gcc -v -S -v -march=native x.i 
Using built-in specs.
COLLECT_GCC=gcc
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --enable-multilib
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id
--with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin
--enable-initfini-array --with-isl --enable-offload-targets=nvptx-none
--without-cuda-driver --enable-gnu-indirect-function --enable-cet
--with-tune=generic --with-arch_32=i686 --with-multilib-list=m32,m64,mx32
--build=x86_64-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.1.1 20200507 (Red Hat 10.1.1-1) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-S' '-v' '-march=native'
 /usr/libexec/gcc/x86_64-redhat-linux/10/cc1 -fpreprocessed x.i
-march=icelake-client -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a
-mcx16 -msahf -mmovbe -maes -msha -mpclmul -mpopcnt -mabm -mno-lwp -mfma
-mno-fma4 -mno-xop -mbmi -msgx -mbmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx
-mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase
-mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mavx512f -mno-avx512er
-mavx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt -mxsavec -mxsaves
-mavx512dq -mavx512bw -mavx512vl -mavx512ifma -mavx512vbmi -mno-avx5124fmaps
-mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mpku -mrdpid -mgfni
-mno-shstk -mavx512vbmi2 -mavx512vnni -mvaes -mvpclmulqdq -mavx512bitalg
-mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite
-mno-avx512bf16 -mno-enqcmd -mno-avx512vp2intersect --param l1-cache-size=48
--param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=generic -quiet
-dumpbase x.i -auxbase x -version -o x.s
GNU C17 (GCC) version 10.1.1 20200507 (Red Hat 10.1.1-1) (x86_64-redhat-linux)
        compiled by GNU C version 10.1.1 20200507 (Red Hat 10.1.1-1), GMP
version 6.1.2, MPFR version 4.0.2-p7, MPC version 1.1.0, isl version
isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C17 (GCC) version 10.1.1 20200507 (Red Hat 10.1.1-1) (x86_64-redhat-linux)
        compiled by GNU C version 10.1.1 20200507 (Red Hat 10.1.1-1), GMP
version 6.1.2, MPFR version 4.0.2-p7, MPC version 1.1.0, isl version
isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 24c549deebb977f25c26f8c5acf76cc6
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/10/:/usr/libexec/gcc/x86_64-redhat-linux/10/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/10/:/usr/lib/gcc/x86_64-redhat-linux/
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/10/:/usr/lib/gcc/x86_64-redhat-linux/10/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/10/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-S' '-v' '-march=native'
[hjl@gnu-icl-1 gcc]$ ./xgcc -B./ -v -S -v -march=native x.i 
Reading specs from ./specs
COLLECT_GCC=./xgcc
Target: x86_64-pc-linux-gnu
Configured with: /home/hjl/work/git/gitlab/x86-gcc/configure
--disable-bootstrap --with-demangler-in-ld --prefix=/usr/gcc-11.0.0-x86-64
--with-local-prefix=/usr/local --enable-gnu-indirect-function
--enable-clocale=gnu --with-system-zlib --with-target-system-zlib
--with-fpmath=sse --disable-libcc1 --disable-libcilkrts --disable-libsanitizer
--disable-libmpx --enable-languages=c,c++ : (reconfigured)
/home/hjl/work/git/gitlab/x86-gcc/configure --disable-bootstrap
--with-demangler-in-ld --prefix=/usr/gcc-11.0.0-x86-64
--with-local-prefix=/usr/local --enable-gnu-indirect-function
--enable-clocale=gnu --with-system-zlib --with-target-system-zlib
--with-fpmath=sse --disable-libcc1 --disable-libcilkrts --disable-libsanitizer
--disable-libmpx CC=cc CFLAGS=-g CXX=g++ CXXFLAGS=-g
--enable-languages=c,c++,lto --no-create --no-recursion
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.0.0 20200522 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-B' './' '-v' '-S' '-v' '-march=native'
 ./cc1 -fpreprocessed x.i -march=icelake-client -mmmx -mno-3dnow -msse -msse2
-msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -msha -mpclmul -mpopcnt
-mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -msgx -mbmi2 -mno-pconfig
-mno-wbnoinvd -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle
-mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt
-mavx512f -mno-avx512er -mavx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt
-mxsavec -mxsaves -mavx512dq -mavx512bw -mavx512vl -mavx512ifma -mavx512vbmi
-mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku
-mrdpid -mgfni -mno-shstk -mavx512vbmi2 -mavx512vnni -mvaes -mvpclmulqdq
-mavx512bitalg -mavx512vpopcntdq -mno-movdiri -mno-movdir64b -mno-waitpkg
-mno-cldemote -mno-ptwrite -mno-avx512bf16 -mno-enqcmd -mno-avx512vp2intersect
-mno-serialize -mno-tsxldtrk --param l1-cache-size=48 --param
l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=icelake-client -quiet
-dumpbase x.i -auxbase x -version -o x.s
GNU C17 (GCC) version 11.0.0 20200522 (experimental) (x86_64-pc-linux-gnu)
        compiled by GNU C version 10.1.1 20200507 (Red Hat 10.1.1-1), GMP
version 6.1.2, MPFR version 4.0.2-p7, MPC version 1.1.0, isl version
isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C17 (GCC) version 11.0.0 20200522 (experimental) (x86_64-pc-linux-gnu)
        compiled by GNU C version 10.1.1 20200507 (Red Hat 10.1.1-1), GMP
version 6.1.2, MPFR version 4.0.2-p7, MPC version 1.1.0, isl version
isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 11f4b64fb9bc00bb503ef65b7f37bf0a
COMPILER_PATH=./
LIBRARY_PATH=./:/lib/../lib64/:/usr/lib/../lib64/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-B' './' '-v' '-S' '-v' '-march=native'
[hjl@gnu-icl-1 gcc]$

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/95400] -march=native and -march=icelake-client produce different results on icelake client
  2020-05-29  4:06 [Bug c++/95400] New: -march=native and -march=icelake-client produce different results on icelake client travis.downs at gmail dot com
  2020-05-29  7:18 ` [Bug target/95400] " marxin at gcc dot gnu.org
  2020-05-29 11:19 ` hjl.tools at gmail dot com
@ 2020-05-29 11:24 ` hjl.tools at gmail dot com
  2020-06-01  8:42 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2020-05-29 11:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95400

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |11.0

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed on master by

commit d83e28f47f5467b435667122add2aa9730e1a89b
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon May 18 05:35:27 2020 -0700

    x86: Update Intel processor detection

    Add cpu model numbers for Intel Airmont, Tremont, Comet Lake, Ice Lake
    and Tiger Lake processor families.

            * config/i386/driver-i386.c (host_detect_local_cpu): Support
            Intel Airmont, Tremont, Comet Lake, Ice Lake and Tiger Lake
            processor families.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/95400] -march=native and -march=icelake-client produce different results on icelake client
  2020-05-29  4:06 [Bug c++/95400] New: -march=native and -march=icelake-client produce different results on icelake client travis.downs at gmail dot com
                   ` (2 preceding siblings ...)
  2020-05-29 11:24 ` hjl.tools at gmail dot com
@ 2020-06-01  8:42 ` marxin at gcc dot gnu.org
  2020-06-05  4:37 ` crazylht at gmail dot com
  2020-06-13 22:58 ` hjl.tools at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-06-01  8:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95400

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Can we backport the change to active branches?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/95400] -march=native and -march=icelake-client produce different results on icelake client
  2020-05-29  4:06 [Bug c++/95400] New: -march=native and -march=icelake-client produce different results on icelake client travis.downs at gmail dot com
                   ` (3 preceding siblings ...)
  2020-06-01  8:42 ` marxin at gcc dot gnu.org
@ 2020-06-05  4:37 ` crazylht at gmail dot com
  2020-06-13 22:58 ` hjl.tools at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: crazylht at gmail dot com @ 2020-06-05  4:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95400

--- Comment #5 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Martin Liška from comment #4)
> Can we backport the change to active branches?

Backport to GCC9, GCC10.
Partially backport to GCC8.(drop tremont and tigerlake part).

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/95400] -march=native and -march=icelake-client produce different results on icelake client
  2020-05-29  4:06 [Bug c++/95400] New: -march=native and -march=icelake-client produce different results on icelake client travis.downs at gmail dot com
                   ` (4 preceding siblings ...)
  2020-06-05  4:37 ` crazylht at gmail dot com
@ 2020-06-13 22:58 ` hjl.tools at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2020-06-13 22:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95400

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |8.5
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed GCC 11, GCC 10.2 (r10-8246), GCC 9.4 (r9-8652) and GCC 8.5 (r8-10298).

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-06-13 22:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29  4:06 [Bug c++/95400] New: -march=native and -march=icelake-client produce different results on icelake client travis.downs at gmail dot com
2020-05-29  7:18 ` [Bug target/95400] " marxin at gcc dot gnu.org
2020-05-29 11:19 ` hjl.tools at gmail dot com
2020-05-29 11:24 ` hjl.tools at gmail dot com
2020-06-01  8:42 ` marxin at gcc dot gnu.org
2020-06-05  4:37 ` crazylht at gmail dot com
2020-06-13 22:58 ` hjl.tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).