public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113257] New: -march=native or -mcpu=native are ineffective, but -march=native -mcpu=native works on arm64 M2 Ultra
@ 2024-01-07 16:08 sjames at gcc dot gnu.org
  2024-01-07 16:09 ` [Bug target/113257] " sjames at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-01-07 16:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113257
           Summary: -march=native or -mcpu=native are ineffective, but
                    -march=native -mcpu=native works on arm64 M2 Ultra
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57002
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57002&action=edit
/proc/cpuinfo

On arm64 M2 Ultra (Apple Mac Studio (M2 Ultra, 2023)), -march=native or
-mcpu=native are ineffective, but -march=native -mcpu=native together works:
```
# gcc -v -E -x c /dev/null -o /dev/null -march=native 2>&1 | grep /cc1
 /usr/libexec/gcc/aarch64-unknown-linux-gnu/13/cc1 -E -quiet -v /dev/null -o
/dev/null -mlittle-endian -mabi=lp64 -dumpbase null

# gcc -v -E -x c /dev/null -o /dev/null -mcpu=native 2>&1 | grep /cc1
 /usr/libexec/gcc/aarch64-unknown-linux-gnu/13/cc1 -E -quiet -v /dev/null -o
/dev/null -mlittle-endian -mabi=lp64 -dumpbase null

# gcc -v -E -x c /dev/null -o /dev/null -march=native -mcpu=native 2>&1 | grep
/cc1
 /usr/libexec/gcc/aarch64-unknown-linux-gnu/13/cc1 -E -quiet -v /dev/null -o
/dev/null -mlittle-endian -mabi=lp64
-march=armv8-a+crc+lse+rcpc+rdma+dotprod+aes+sha3+fp16fml+sb+ssbs+i8mm+bf16+flagm+pauth
-dumpbase null
```

```
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-unknown-linux-gnu/13/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with:
/tmp/portage/sys-devel/gcc-13.2.1_p20231216/work/gcc-13-20231216/configure
--host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu
--prefix=/usr --bindir=/usr/aarch64-unknown-linux-gnu/gcc-bin/13
--includedir=/usr/lib/gcc/aarch64-unknown-linux-gnu/13/include
--datadir=/usr/share/gcc-data/aarch64-unknown-linux-gnu/13
--mandir=/usr/share/gcc-data/aarch64-unknown-linux-gnu/13/man
--infodir=/usr/share/gcc-data/aarch64-unknown-linux-gnu/13/info
--with-gxx-include-dir=/usr/lib/gcc/aarch64-unknown-linux-gnu/13/include/g++-v13
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/aarch64-unknown-linux-gnu/13/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo
13.2.1_p20231216 p11' --with-gcc-major-version-only --enable-libstdcxx-time
--enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --disable-multilib
--disable-fixed-point --enable-libgomp --disable-libssp --disable-libada
--disable-cet --disable-systemtap --disable-valgrind-annotations
--disable-vtable-verify --disable-libvtv --without-zstd --without-isl
--enable-default-pie --enable-default-ssp --disable-bootstrap
--with-build-config=bootstrap-O3
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.2.1 20231216 (Gentoo 13.2.1_p20231216 p11) 
```

This came up first downstream at https://bugs.gentoo.org/830165#c11.

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

end of thread, other threads:[~2024-02-26 16:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-07 16:08 [Bug target/113257] New: -march=native or -mcpu=native are ineffective, but -march=native -mcpu=native works on arm64 M2 Ultra sjames at gcc dot gnu.org
2024-01-07 16:09 ` [Bug target/113257] " sjames at gcc dot gnu.org
2024-01-08 10:49 ` rearnsha at gcc dot gnu.org
2024-01-08 11:02 ` sjames at gcc dot gnu.org
2024-01-08 11:35 ` rearnsha at gcc dot gnu.org
2024-02-22 18:35 ` tnfchris at gcc dot gnu.org
2024-02-26 16:48 ` sjames at gcc dot gnu.org

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).