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 middle-end/111699] [14 Regression] ICE: SIGSEGV: infinite recursion in fold_build3_loc/fold_ternary_loc/generic_simplify_VEC_COND_EXPR
Date: Fri, 06 Oct 2023 08:11:47 +0000	[thread overview]
Message-ID: <bug-111699-4-rqazt0bKeg@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111699-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:e77428a9a336f57e3efe3eff95f2b491d7e9be14

commit r14-4432-ge77428a9a336f57e3efe3eff95f2b491d7e9be14
Author: Andrew Pinski <pinskia@gmail.com>
Date:   Thu Oct 5 12:21:19 2023 -0700

    MATCH: Fix infinite loop between `vec_cond(vec_cond(a,b,0), c, d)` and `a &
b`

    Match has a pattern which converts `vec_cond(vec_cond(a,b,0), c, d)`
    into `vec_cond(a & b, c, d)` but since in this case a is a comparison
    fold will change `a & b` back into `vec_cond(a,b,0)` which causes an
    infinite loop.
    The best way to fix this is to enable the patterns for
vec_cond(*,vec_cond,*)
    only for GIMPLE so we don't get an infinite loop for fold any more.

    Note this is a latent bug since these patterns were added in
r11-2577-g229752afe3156a
    and was exposed by r14-3350-g47b833a9abe1 where now able to remove a
VIEW_CONVERT_EXPR.

    OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

            PR middle-end/111699

    gcc/ChangeLog:

            * match.pd ((c ? a : b) op d, (c ? a : b) op (c ? d : e),
            (v ? w : 0) ? a : b, c1 ? c2 ? a : b : b): Enable only for GIMPLE.

    gcc/testsuite/ChangeLog:

            * gcc.c-torture/compile/pr111699-1.c: New test.

  parent reply	other threads:[~2023-10-06  8:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05  5:19 [Bug middle-end/111699] New: " zsojka at seznam dot cz
2023-10-05  7:54 ` [Bug middle-end/111699] " rguenth at gcc dot gnu.org
2023-10-05 17:26 ` pinskia at gcc dot gnu.org
2023-10-05 17:40 ` pinskia at gcc dot gnu.org
2023-10-05 17:49 ` pinskia at gcc dot gnu.org
2023-10-05 19:16 ` pinskia at gcc dot gnu.org
2023-10-05 23:15 ` pinskia at gcc dot gnu.org
2023-10-06  8:11 ` cvs-commit at gcc dot gnu.org [this message]
2023-10-06  8:12 ` pinskia at gcc dot gnu.org
2023-10-07 20:54 ` [Bug middle-end/111699] [11/12/13 " cvs-commit at gcc dot gnu.org
2023-10-07 21:11 ` cvs-commit at gcc dot gnu.org
2023-10-07 21:33 ` cvs-commit at gcc dot gnu.org
2023-10-07 21:34 ` 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-111699-4-rqazt0bKeg@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).