public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98544] New: [11 regression] Wrong code generated by tree vectorizer
@ 2021-01-05 18:50 martin@mpa-garching.mpg.de
  2021-01-05 19:36 ` [Bug tree-optimization/98544] " martin@mpa-garching.mpg.de
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: martin@mpa-garching.mpg.de @ 2021-01-05 18:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98544
           Summary: [11 regression] Wrong code generated by tree
                    vectorizer
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: martin@mpa-garching.mpg.de
  Target Milestone: ---

Created attachment 49893
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49893&action=edit
test case

The attached test case (sorry, I don't have the time to reduce this properly at
the moment ...) tests real-valued FFTs of different lengths and should not
output anything if compiled properly.

However, with current trunk and the following compiler command line, some of
the results are really wrong:

martin@debian:~/codes/ducc/bug$ g++ -std=c++17 -O1 -mavx -ftree-vectorize
bug2.cc
martin@debian:~/codes/ducc/bug$ ./a.out
problem at length 15; discrepancy is 4.40898
problem at length 20; discrepancy is 4.54691
problem at length 21; discrepancy is 3.70442
problem at length 25; discrepancy is 8.40318
problem at length 27; discrepancy is 8.44956
problem at length 28; discrepancy is 3.12203
problem at length 30; discrepancy is 8.81795

The discrepancies should be below 1e-15.

The failure goes away when removing either "-ftree-vectorize" or "-mavx". On
released versions of gcc, it runs fine.

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

end of thread, other threads:[~2021-01-08 14:18 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05 18:50 [Bug c++/98544] New: [11 regression] Wrong code generated by tree vectorizer martin@mpa-garching.mpg.de
2021-01-05 19:36 ` [Bug tree-optimization/98544] " martin@mpa-garching.mpg.de
2021-01-06  6:00 ` marxin at gcc dot gnu.org
2021-01-06  6:03 ` [Bug tree-optimization/98544] [11 regression] Wrong code generated by tree vectorizer since r11-3917-g28290cb50c7dbf87 marxin at gcc dot gnu.org
2021-01-06  9:02 ` rguenth at gcc dot gnu.org
2021-01-07 13:59 ` rguenth at gcc dot gnu.org
2021-01-07 14:26 ` marxin at gcc dot gnu.org
2021-01-07 14:27 ` rguenth at gcc dot gnu.org
2021-01-07 14:35 ` rguenth at gcc dot gnu.org
2021-01-07 15:01 ` rguenth at gcc dot gnu.org
2021-01-07 15:05 ` rguenth at gcc dot gnu.org
2021-01-07 15:19 ` rguenth at gcc dot gnu.org
2021-01-07 15:29 ` rguenth at gcc dot gnu.org
2021-01-07 15:37 ` martin@mpa-garching.mpg.de
2021-01-07 15:50 ` rguenth at gcc dot gnu.org
2021-01-07 16:08 ` martin@mpa-garching.mpg.de
2021-01-07 16:48 ` rguenth at gcc dot gnu.org
2021-01-08 12:14 ` rguenth at gcc dot gnu.org
2021-01-08 12:16 ` rguenth at gcc dot gnu.org
2021-01-08 12:20 ` marxin at gcc dot gnu.org
2021-01-08 13:09 ` cvs-commit at gcc dot gnu.org
2021-01-08 13:09 ` rguenth at gcc dot gnu.org
2021-01-08 14:07 ` martin@mpa-garching.mpg.de
2021-01-08 14:18 ` rguenther at suse dot de

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