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/98629] [11 Regression] ice during GIMPLE pass: widening_mul Date: Tue, 12 Jan 2021 10:05:59 +0000 [thread overview] Message-ID: <bug-98629-4-4zDI5flDPK@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-98629-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98629 --- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:24ea113f75cfad38894dc1ad16b23c0538ef17d4 commit r11-6610-g24ea113f75cfad38894dc1ad16b23c0538ef17d4 Author: Jakub Jelinek <jakub@redhat.com> Date: Tue Jan 12 11:04:46 2021 +0100 widening_mul: Fix up ICE caused by my signed multiplication overflow pattern recognition changes [PR98629] As the testcase shows, my latest changes caused ICE on that testcase. The problem is that arith_overflow_check_p now can change the use_stmt argument (has a reference), so that if it succeeds (returns non-zero), it points it to the GIMPLE_COND or EQ/NE or COND_EXPR assignment from the TRUNC_DIV_EXPR assignment. The problem was that it would change use_stmt also if it returned 0 in some cases, such as multiple imm uses of the division, and in one of the callers if arith_overflow_check_p returns 0 it looks at use_stmt again and performs other checks, which of course assumes that use_stmt is the one passed to arith_overflow_check_p and not e.g. NULL instead or some other unrelated stmt. The following patch fixes that by only changing use_stmt when we are about to return non-zero (for the MULT_EXPR case, which is the only one with the need to use different use_stmt). 2021-01-12 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/98629 * tree-ssa-math-opts.c (arith_overflow_check_p): Don't update use_stmt unless returning non-zero. * gcc.c-torture/compile/pr98629.c: New test.
next prev parent reply other threads:[~2021-01-12 10:05 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-11 21:32 [Bug c/98629] New: " dcb314 at hotmail dot com 2021-01-11 21:49 ` [Bug c/98629] " dcb314 at hotmail dot com 2021-01-11 22:47 ` [Bug tree-optimization/98629] [11 Regression] " jakub at gcc dot gnu.org 2021-01-11 23:03 ` jakub at gcc dot gnu.org 2021-01-12 10:05 ` cvs-commit at gcc dot gnu.org [this message] 2021-01-15 0:46 ` jakub 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-98629-4-4zDI5flDPK@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).