public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/110838] [14 Regression] wrong code on x365-3.5, -O3, sign extraction
Date: Thu, 03 Aug 2023 12:53:13 +0000	[thread overview]
Message-ID: <bug-110838-4-tGrEF683F8@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110838-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:29370f1387274ad5a35a020db6a5d06c0324e6c1

commit r14-2952-g29370f1387274ad5a35a020db6a5d06c0324e6c1
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jul 31 14:44:52 2023 +0200

    tree-optimization/110838 - vectorization of widened shifts

    The following makes sure to limit the shift operand when vectorizing
    (short)((int)x >> 31) via (short)x >> 31 as the out of bounds shift
    operand otherwise invokes undefined behavior.  When we determine
    whether we can demote the operand we know we at most shift in the
    sign bit so we can adjust the shift amount.

    Note this has the possibility of un-CSEing common shift operands
    as there's no good way to share pattern stmts between patterns.
    We'd have to separately pattern recognize the definition.

            PR tree-optimization/110838
            * tree-vect-patterns.cc (vect_recog_over_widening_pattern):
            Adjust the shift operand of RSHIFT_EXPRs.

            * gcc.dg/torture/pr110838.c: New testcase.

  parent reply	other threads:[~2023-08-03 12:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28  7:33 [Bug target/110838] New: [14 Regression] wrong code on x265-3.5, " slyfox at gcc dot gnu.org
2023-07-28  7:55 ` [Bug target/110838] [14 Regression] wrong code on x365-3.5, " pinskia at gcc dot gnu.org
2023-07-28  7:59 ` [Bug tree-optimization/110838] " slyfox at gcc dot gnu.org
2023-07-28  7:59 ` rguenth at gcc dot gnu.org
2023-07-28  8:01 ` rguenth at gcc dot gnu.org
2023-07-28  8:08 ` rguenth at gcc dot gnu.org
2023-07-28 12:04 ` rguenth at gcc dot gnu.org
2023-07-28 12:05 ` rguenth at gcc dot gnu.org
2023-07-31 11:58 ` rguenth at gcc dot gnu.org
2023-08-01  8:37 ` slyfox at gcc dot gnu.org
2023-08-03 12:53 ` cvs-commit at gcc dot gnu.org [this message]
2023-08-03 13:01 ` rguenth at gcc dot gnu.org
2023-08-04 10:16 ` cvs-commit at gcc dot gnu.org
2023-08-04 11:15 ` cvs-commit at gcc dot gnu.org
2023-08-24  9:01 ` rguenth at gcc dot gnu.org
2023-10-17 12:21 ` rguenth at gcc dot gnu.org
2024-03-26 14:58 ` cvs-commit at gcc dot gnu.org
2024-03-26 15:05 ` cvs-commit 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-110838-4-tGrEF683F8@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).