public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "martin@mpa-garching.mpg.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/98544] New: [11 regression] Wrong code generated by tree vectorizer
Date: Tue, 05 Jan 2021 18:50:18 +0000	[thread overview]
Message-ID: <bug-98544-4@http.gcc.gnu.org/bugzilla/> (raw)

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.

             reply	other threads:[~2021-01-05 18:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05 18:50 martin@mpa-garching.mpg.de [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-98544-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).