public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/104551] [12 Regression] Wrong code with -O3 for skylake-avx512, icelake-server, and sapphirerapids
Date: Tue, 15 Feb 2022 23:21:13 +0000	[thread overview]
Message-ID: <bug-104551-4-4lArEhmK4y@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104551-4@http.gcc.gnu.org/bugzilla/>

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
            Summary|Wrong code with -O3 for     |[12 Regression] Wrong code
                   |skylake-avx512,             |with -O3 for
                   |icelake-server, and         |skylake-avx512,
                   |sapphirerapids              |icelake-server, and
                   |                            |sapphirerapids
   Target Milestone|---                         |12.0
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-02-15

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, single file version:
unsigned int var_11 = 16U;
unsigned int var_178 = 0;
unsigned char arr_492 [128];
[[gnu::noipa]]
void test() {
  for (bool a = 0; a < (bool)var_11; a = 2)
    for (unsigned b = 0; b < var_11;
         b += 1)
      var_178 = arr_492[b] ? arr_492[b] : (char) b;
}
int main() {
    for (int i = 0; i < 128; ++i)
        arr_492 [i] = (unsigned char)128;
    test();
    __builtin_printf("%u\n", var_178);
    if (var_178 != 128)
        __builtin_abort();
    return 0;
}

----- CUT -----

I increasing the array size to 128 allowed me to merge it, I don't know why
though; maybe because it allowed the code to be vectorize while 16 was not
going to.

  reply	other threads:[~2022-02-15 23:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 18:01 [Bug tree-optimization/104551] New: " vsevolod.livinskij at frtk dot ru
2022-02-15 23:21 ` pinskia at gcc dot gnu.org [this message]
2022-02-16  1:52 ` [Bug tree-optimization/104551] [12 Regression] " crazylht at gmail dot com
2022-02-16  2:34 ` crazylht at gmail dot com
2022-02-16  3:57 ` crazylht at gmail dot com
2022-02-17 11:01 ` cvs-commit at gcc dot gnu.org
2022-02-17 11:02 ` crazylht at gmail dot com
2022-02-18  0:37 ` 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-104551-4-4lArEhmK4y@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).