public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/103905] [12 Regression] Miscompiled i386-expand.c with -march=bdver1 and -O3 since r12-1789-g836328b2c99f5b8d
Date: Wed, 05 Jan 2022 05:43:40 +0000	[thread overview]
Message-ID: <bug-103905-4-spNSHKFf6d@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103905-4@http.gcc.gnu.org/bugzilla/>

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-01-05

--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
> 
> Do you know what nelt and odd values are used during the misbehaving
> *_vec_even_odd on your testcase?  If so, perhaps we could make bar noipa and
> add perm verification in there, make foo also noipa and just call it from
> main with those arguments...

Thanks Jakub for the hint. Apparently, I was quite close to the testcase, but
one needs nelt=8 and 64 elements of the perm array.

So there's simplified test-case:

$ cat xop.C
int N = 8;
char perm[64];

void
__attribute__((noipa))
check (void)
{
  for (int i = 0; i < N; ++i)
    __builtin_printf("perm[%d]=%d\n", i, perm[i]);

  if (perm[7] != 7)
    __builtin_abort ();
}

int main()
{
  for (int i = 0; i < N; ++i)
    perm[i] = i;

  check ();
  return 0;
}

$ gcc xop.C -march=bdver1 -O3
$ ./a.out
perm[0]=0
perm[1]=1
perm[2]=0
perm[3]=0
perm[4]=4
perm[5]=5
perm[6]=0
perm[7]=0
Aborted (core dumped)

  parent reply	other threads:[~2022-01-05  5:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04 19:29 [Bug target/103905] New: " marxin at gcc dot gnu.org
2022-01-04 19:30 ` [Bug target/103905] " pinskia at gcc dot gnu.org
2022-01-04 19:56 ` marxin at gcc dot gnu.org
2022-01-04 20:12 ` ubizjak at gmail dot com
2022-01-04 21:03 ` ubizjak at gmail dot com
2022-01-04 21:14 ` ubizjak at gmail dot com
2022-01-04 21:31 ` jakub at gcc dot gnu.org
2022-01-04 21:44 ` ubizjak at gmail dot com
2022-01-05  5:43 ` marxin at gcc dot gnu.org [this message]
2022-01-05  7:48 ` rguenth at gcc dot gnu.org
2022-01-05  8:57 ` ubizjak at gmail dot com
2022-01-05  9:02 ` marxin at gcc dot gnu.org
2022-01-05  9:17 ` jakub at gcc dot gnu.org
2022-01-05  9:29 ` ubizjak at gmail dot com
2022-01-05 10:01 ` marxin at gcc dot gnu.org
2022-01-05 19:07 ` cvs-commit at gcc dot gnu.org
2022-01-05 19:14 ` ubizjak at gmail dot com
2022-01-06 21:26 ` pinskia 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-103905-4-spNSHKFf6d@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).