public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/60454] New: Code mistakenly detected as doing bswap
@ 2014-03-07  6:11 thomas.preudhomme at arm dot com
  2014-03-07  8:32 ` [Bug tree-optimization/60454] " thomas.preudhomme at arm dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: thomas.preudhomme at arm dot com @ 2014-03-07  6:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60454
           Summary: Code mistakenly detected as doing bswap
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thomas.preudhomme at arm dot com

Created attachment 32296
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32296&action=edit
Testcase for bswap incorrect detection

Optimization pass optimize_bswap in tree-ssa-math-opts.c incorrectly detect a
bswap being performed in certain cases, leading to wrong code being generated.

Please find attached a testcase that exhibit the problem. Compile with trunk
gcc with gcc -O2 -fdump-tree-bswap -c testcase.c and observe that
testcase.c.*bswap contains the string "32 bit bswap implementation found at"
while the code does not perform a byte swap. This test was tried on an Ubuntu
"13.10 (saucy) with 4.8.1 and trunk gcc.

gcc 4.8.1 was configured with:

../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.8.1-10ubuntu9'
--with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --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.8-amd64/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu

while trunk gcc was configured with:

../src/configure --prefix=../install --target=arm-none-eabi
--enable-languages=c,c++ --with-mode=thumb --with-cpu=cortex-m3 --with-newlib
--with-headers=../src/newlib/libc/include --enable-newlib-register-fini
--disable-newlib-supplied-syscalls --disable-multilib --with-libexpat
--with-system-zlib --disable-gdbtk --enable-plugins --disable-libgomp
--disable-libmudflap --disable-libquadmath --disable-libssp
--disable-libstdcxx-pch --disable-nls --disable-rda --disable-sid --disable-tui
--disable-utils --disable-werror --disable-fixed-point

I'm currently cleaning a patch to solve this issue.

Best regards.


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

end of thread, other threads:[~2014-06-12 13:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-07  6:11 [Bug tree-optimization/60454] New: Code mistakenly detected as doing bswap thomas.preudhomme at arm dot com
2014-03-07  8:32 ` [Bug tree-optimization/60454] " thomas.preudhomme at arm dot com
2014-03-07  8:51 ` [Bug tree-optimization/60454] [4.7/4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2014-03-07  9:01 ` thomas.preudhomme at arm dot com
2014-03-07  9:22 ` thomas.preudhomme at arm dot com
2014-03-07 11:29 ` thomas.preudhomme at arm dot com
2014-03-12 10:16 ` jakub at gcc dot gnu.org
2014-03-12 12:12 ` [Bug tree-optimization/60454] [4.7/4.8 " jakub at gcc dot gnu.org
2014-03-13  5:27 ` thomas.preudhomme at arm dot com
2014-03-13  7:00 ` jye2 at gcc dot gnu.org
2014-03-13  7:21 ` jakub at gcc dot gnu.org
2014-06-12 13:37 ` [Bug tree-optimization/60454] [4.7 " rguenth 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).