From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14647 invoked by alias); 12 Apr 2013 18:42:54 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 14594 invoked by uid 55); 12 Apr 2013 18:42:50 -0000 From: "winfried.magerl@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/56866] gcc 4.7.x/gcc-4.8.x with '-O3 -march=bdver2' misscompiles glibc-2.17/crypt/sha512.c Date: Fri, 12 Apr 2013 18:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: winfried.magerl@t-online.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg01303.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56866 --- Comment #7 from Winfried Magerl 2013-04-12 18:42:48 UTC --- Hi, On Fri, Apr 12, 2013 at 12:42:26PM +0000, mikpe at it dot uu.se wrote: > --- Comment #6 from Mikael Pettersson 2013-04-12 12:42:26 UTC --- > I've bootstrapped and regtested gcc-4.7.3 on an Opteron 6278, with and without > --with-arch=bdver1. With --with-arch=bdver1 there were numerous regressions in > gcc.dg/vect/ and gcc.target/i386/{,l-}fma*, and one in > gcc.target/i386/pr42542-4a.c. I don't know if these indicate wrong-code or > missed-optimization. something like egrep '^FAIL.+execution' to get the scary errors (currently I think all that scan-*-errors are simply false positive). > I'd be willing to run specific wrong-code test cases on this machine, if > they're completely standalone (not depending on recent glibc). Don't know how to pick out single gcc-testcases from the testsuite for standalone-testing. In any case it's possible th check the whole package. gcc/glibc have a big test-suite and it's not necessary to install them to run the test-suite. And I have already provided the differences I see when enabling 'bdver2' compared with 'amdfam10' for gcc something like this (out of the head with typos included): -------------------------------------------- cd /to/your/favorite/builddir wget ftp:///ftp.gnu.org/gnu/gcc/gcc-4.8.0/gcc-4.8.0.tar.bz2 tar -xf gcc-4.8.0.tar.bz2 mkdir build mkdir build-bdver1 cd build/ ../gcc-4.8.0/configure --enable-multilib=no --enable-languages='c,c++' make -j8 >& make.out make -j8 -k check >& check.out ../gcc-4.8/contrib/test_summary >& test_summary.out cd ../build-bdver1 ../gcc-4.8.0/configure --enable-multilib=no --enable-languages='c,c++' --with-arch=bdver1 make -j8 >& make.out make -j8 -k check >& check.out ../gcc-4.8/contrib/test_summary >& test_summary.out cd .. diff -u build/test_summary.out build-bdver1/test_summary.out | egrep '^\+.+execution' ---------------------------------------------- some notes: --enable-multilib=no -> only x86_64 --enable-languages='c,c++' -> only c-tests are of interest make -j8 -> depends on your CPU egrep '^\+.+execution' -> for easier comparison with the diff I've provided --with-arch=bdver1 -> your CPU is bdver1 for glibc it's something similar: -------------------------------------------- cd /to/your/favorite/builddir wget ftp:///ftp.gnu.org/glibc/glibc-2.17.tar.xz tar -xf glibc-2.17.tar.xz mkdir build mkdir build-bdver1 cd build/ export CC='gcc' export CFLAGS='-O3' ../glibc-2.17/configure make -j8 >& make.out make -k -j8 check >& check.out cd ../build-bdver1 export CC='gcc -march=bdver1' ../glibc-2.17/configure make -j8 >& make.out make -k -j8 check >& check.out cd .. fgrep '***' build/check.out build-bdver1/check.out -------------------------------------------- To ensure it's XOP in glibc you can use CC='gcc -mxop' instead of CC='gcc -march=bdver1'. regards winfried