public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/103063] [9/10/11/12 Regression] Wrong code while using -O3 since r7-2373-g69b806f6a60efcf1
Date: Wed, 19 Jan 2022 17:42:55 +0000	[thread overview]
Message-ID: <bug-103063-4-uO3UyJiq5B@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103063-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
ifcvt dump looks correct to me, in vect it seems the vectorizer thinks it can
compute the number of iterations of the inner loop using:
  _33 = b_lsm.8_5 * 6;
  _34 = _33 / 6;
  niters.11_32 = _34 + 1;
  _42 = b_lsm.8_5 * 6;
  if (_42 <= 89)

For b_lsm.8_5 == 0 niters.11_32 is correctly 1, but for b_lsm.8_5 == 255 it
gives
42 (i.e. (0x5fa & 0xff) / 6 + 1), while it should be 128, because the only
[0,255] values for which (v*6) & 0xff == 0 are 0 and 128.

  parent reply	other threads:[~2022-01-19 17:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03 16:04 [Bug tree-optimization/103063] New: Wrong code while using -O3 stefansf at linux dot ibm.com
2021-11-03 17:23 ` [Bug tree-optimization/103063] " marxin at gcc dot gnu.org
2021-11-03 17:25 ` [Bug tree-optimization/103063] [9/10/11/12 Regression] Wrong code while using -O3 since r7-2373-g69b806f6a60efcf1 pinskia at gcc dot gnu.org
2021-11-04  9:02 ` rguenth at gcc dot gnu.org
2022-01-19 16:33 ` jakub at gcc dot gnu.org
2022-01-19 16:35 ` jakub at gcc dot gnu.org
2022-01-19 17:42 ` jakub at gcc dot gnu.org [this message]
2022-01-20  7:04 ` rguenth at gcc dot gnu.org
2022-01-24 13:16 ` 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-103063-4-uO3UyJiq5B@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).