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

            Bug ID: 85854
           Summary: Performance regression from gcc 4.9.2
           Product: gcc
           Version: 8.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: beldmit at gmail dot com
  Target Milestone: ---

Created attachment 44154
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44154&action=edit
Preprocessing file.

I got a serious (10%) performance degradation using cross-compiler for ARM.

Compiler version: 
arm-linux-gnueabihf-gcc-8 -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-gcc-8
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabihf/8/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 8.1.0-3'
--with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-8 --enable-shared
--enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/
--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm
--disable-libquadmath --disable-libquadmath-support --enable-plugin
--enable-default-pie --with-system-zlib --with-target-system-zlib
--enable-multiarch --disable-sjlj-exceptions --with-arch=armv7-a
--with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=arm-linux-gnueabihf --program-prefix=arm-linux-gnueabihf-
--includedir=/usr/arm-linux-gnueabihf/include
Thread model: posix
gcc version 8.1.0 (Debian 8.1.0-3) 

System: Linux x-debian 4.16.0-1-amd64 #1 SMP Debian 4.16.5-1 (2018-04-29)
x86_64 GNU/Linux

Compiler options:
arm-linux-gnueabihf-gcc-8 -c  -DSTRICT_OFFSET -mfpu=neon -O1 -D_REENTRANT 
-DTHREAD_TYPE=THREAD_TYPE_PTHREADS -fPIC -DNDEBUG -DCC_NO_RDS_SOCKET
-DCC_NO_RDS_FILECNT -DCC_NO_RDS_NP -D_GNU_SOURCE -pedantic -Wall -Wextra
-Wno-long-long -g -save-temps gosthash2012.c

The preprocessed file is attached. The most time-taking part of the code is the
function named g.

The new version does not use neon vector ops (such as veor) at all, but the
4.9.2 on native ARM system does.

The system withoud degradation is 
Linux odroid 3.10.107 #1 SMP PREEMPT Wed Sep 13 18:48:10 CEST 2017 armv7l
GNU/Linux

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10'
--with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm
--disable-libquadmath --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf
--with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-sjlj-exceptions
--with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb
--enable-checking=release --build=arm-linux-gnueabihf
--host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10)

Reply via email to