public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/60276] New: -O3 autovectorizer breaks on a particular loop
@ 2014-02-19 19:53 maister at archlinux dot us
  2014-02-20 10:24 ` [Bug tree-optimization/60276] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: maister at archlinux dot us @ 2014-02-19 19:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60276
           Summary: -O3 autovectorizer breaks on a particular loop
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: maister at archlinux dot us

Created attachment 32174
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32174&action=edit
Reduced testcase

GCC 4.8.2 with -O3 breaks a certain loop I'm compiling. Disabling the
vectorizer with -fno-tree-vectorize fixes the issue, as well as compiling with
-O2.

I've reduced the problem to a small test case which is attached as legall.c.

Distro: Arch Linux x86_64
gcc -v: 
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc-4.8-20140206/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-cloog-backend=isl --disable-cloog-version-check --enable-lto
--enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu
--disable-multilib --disable-werror --enable-checking=release
Thread model: posix
gcc version 4.8.2 20140206 (prerelease) (GCC)

Miscompile: gcc -o legall legall.c -std=gnu99 -O3
Working: gcc -o legall legall.c -std=gnu99 -O3 -fno-tree-vectorize

Expected output:
(0) (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17)
(18) (19) (20) (21) (22) (23) (24) (25) (26) (27) (28) (29) (30) (31) (32) (33)
(34) (35) (36) (37) (38) (39) (40) (41) (42) (43) (44) (45) (46) (47) (48)

Wrong output by -O3:
(0) (1) (2) (2) (4) (3) (6) (4) (8) (5) (10) (6) (12) (7) (14) (8) (16) (17)
(18) (10) (20) (11) (22) (12) (24) (13) (26) (14) (28) (15) (30) (16) (32) (33)
(34) (35) (36) (37) (38) (39) (40) (41) (42) (43) (44) (45) (46) (47) (48)


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

end of thread, other threads:[~2024-05-13 12:55 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-19 19:53 [Bug c/60276] New: -O3 autovectorizer breaks on a particular loop maister at archlinux dot us
2014-02-20 10:24 ` [Bug tree-optimization/60276] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
2014-02-20 11:53 ` [Bug tree-optimization/60276] [4.7/4.8/4.9 " rguenth at gcc dot gnu.org
2014-02-20 12:00 ` rguenth at gcc dot gnu.org
2014-02-20 12:30 ` rguenth at gcc dot gnu.org
2014-02-20 12:56 ` rguenth at gcc dot gnu.org
2014-02-20 13:03 ` mpolacek at gcc dot gnu.org
2014-02-20 15:13 ` rguenth at gcc dot gnu.org
2014-02-21 13:19 ` rguenth at gcc dot gnu.org
2014-02-21 13:19 ` [Bug tree-optimization/60276] [4.7/4.8 " rguenth at gcc dot gnu.org
2014-02-25 12:43 ` rguenth at gcc dot gnu.org
2014-03-06  8:24 ` [Bug tree-optimization/60276] [4.7 " jakub at gcc dot gnu.org
2014-06-12 13:35 ` rguenth at gcc dot gnu.org
2014-09-03  9:02 ` rguenth at gcc dot gnu.org
2024-05-13 12:55 ` cvs-commit 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).