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/115154] [13/14/15 Regression] wrong code at optimization levels -O2, -O3, -Os since r13-7434-g682bbd364708fe Date: Tue, 21 May 2024 14:29:12 +0000 [thread overview] Message-ID: <bug-115154-4-1VRRSR2XGf@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-115154-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115154 --- Comment #18 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>: https://gcc.gnu.org/g:d6cf49eaf5ac237c57785dce42c89deac911affa commit r13-8783-gd6cf49eaf5ac237c57785dce42c89deac911affa Author: Andrew Pinski <quic_apinski@quicinc.com> Date: Mon May 20 00:16:40 2024 -0700 match: Disable `(type)zero_one_valuep*CST` for 1bit signed types [PR115154] The problem here is the pattern added in r13-1162-g9991d84d2a8435 assumes that it is well defined to multiply zero_one_valuep by the truncated converted integer constant. It is well defined for all types except for signed 1bit types. Where `a * -1` is produced which is undefined/ So disable this pattern for 1bit signed types. Note the pattern added in r14-3432-gddd64a6ec3b38e is able to workaround the undefinedness except when `-fsanitize=undefined` is turned on, this is why I added a testcase for that. Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/115154 gcc/ChangeLog: * match.pd (convert (mult zero_one_valued_p@1 INTEGER_CST@2)): Disable for 1bit signed types. gcc/testsuite/ChangeLog: * c-c++-common/ubsan/signed1bitfield-1.c: New test. * gcc.c-torture/execute/signed1bitfield-1.c: New test. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com> (cherry picked from commit 49c87d22535ac4f8aacf088b3f462861c26cacb4)
next prev parent reply other threads:[~2024-05-21 14:29 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-05-19 2:46 [Bug tree-optimization/115154] New: [13/14 Regression] wrong code at optimization levels -O2, -O3, -Os bic60176 at gmail dot com 2024-05-19 2:55 ` [Bug tree-optimization/115154] [13 " pinskia at gcc dot gnu.org 2024-05-19 3:04 ` pinskia at gcc dot gnu.org 2024-05-19 3:08 ` pinskia at gcc dot gnu.org 2024-05-19 7:23 ` sjames at gcc dot gnu.org 2024-05-19 14:05 ` [Bug tree-optimization/115154] [13 Regression] wrong code at optimization levels -O2, -O3, -Os since r13-7434-g682bbd364708fe sjames at gcc dot gnu.org 2024-05-19 22:09 ` sjames at gcc dot gnu.org 2024-05-19 22:17 ` pinskia at gcc dot gnu.org 2024-05-19 22:41 ` pinskia at gcc dot gnu.org 2024-05-19 22:47 ` pinskia at gcc dot gnu.org 2024-05-19 22:57 ` [Bug tree-optimization/115154] [13/14/15 " pinskia at gcc dot gnu.org 2024-05-19 22:59 ` pinskia at gcc dot gnu.org 2024-05-19 23:09 ` pinskia at gcc dot gnu.org 2024-05-20 7:29 ` pinskia at gcc dot gnu.org 2024-05-20 22:03 ` pinskia at gcc dot gnu.org 2024-05-21 9:20 ` jakub at gcc dot gnu.org 2024-05-21 14:24 ` cvs-commit at gcc dot gnu.org 2024-05-21 14:25 ` cvs-commit at gcc dot gnu.org 2024-05-21 14:29 ` cvs-commit at gcc dot gnu.org [this message] 2024-05-21 14:31 ` 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-115154-4-1VRRSR2XGf@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: linkBe 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).