public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/101207] [12 Regression] gcc.dg/vect/vect-strided-*-mult.c fails after SLP improvements
Date: Mon, 28 Jun 2021 07:26:46 +0000	[thread overview]
Message-ID: <bug-101207-4-wmzhxM88m9@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101207-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ah, so what happens is that we elide the load permutation that feeds the
plus reduction originally but then we vectorize the live operands of the
minus reduction as BIT_FIELD_REFs ending up extracting the wrong lanes.

Testcase for x86_64:

/* { dg-additional-options "-ftree-slp-vectorize -ffast-math" } */

double a[2];
double x, y;

void __attribute__((noipa)) foo ()
{
  x = a[1] - a[0];
  y = a[0] + a[1];
}

int main()
{
  a[0] = 0.;
  a[1] = 1.;
  foo ();
  if (x != 1. || y != 1.)
    __builtin_abort ();
  return 0;
}

  parent reply	other threads:[~2021-06-28  7:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25  9:44 [Bug tree-optimization/101207] New: [12 Regress] gcc.dg/vect/vect-strided-mult.c " pinskia at gcc dot gnu.org
2021-06-25  9:45 ` [Bug tree-optimization/101207] " pinskia at gcc dot gnu.org
2021-06-25  9:53 ` [Bug tree-optimization/101207] [12 Regress] gcc.dg/vect/vect-strided-*-mult.c " pinskia at gcc dot gnu.org
2021-06-25 10:07 ` [Bug tree-optimization/101207] [12 Regression] " pinskia at gcc dot gnu.org
2021-06-25 10:11 ` pinskia at gcc dot gnu.org
2021-06-28  6:54 ` rguenth at gcc dot gnu.org
2021-06-28  7:26 ` rguenth at gcc dot gnu.org [this message]
2021-06-28  7:45 ` rguenth at gcc dot gnu.org
2021-06-28  7:55 ` pinskia at gcc dot gnu.org
2021-06-28  8:35 ` cvs-commit at gcc dot gnu.org
2021-06-28  8:35 ` rguenth at gcc dot gnu.org

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-101207-4-wmzhxM88m9@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).