public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "aldyh at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/95649] [11 Regression] ICE during GIMPLE pass: cunroll since r11-1146-g1396fa5b91cfa0b3
Date: Tue, 16 Jun 2020 11:56:46 +0000	[thread overview]
Message-ID: <bug-95649-4-8jUEEGwnKT@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95649-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Hmmm, previous code propagating into PHI args had:

-         if (vr->singleton_p (&val) && may_propagate_copy (arg, val))
-           propagate_value (use_p, val);

We seem to have lost the check for constants, and we're now propagating any old
value from get_value_range-- which may be another SSA name:

+         if (val && may_propagate_copy (arg, val))
+           propagate_value (use_p, val);


Testing the following:

diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index 4fda296ef9e..01ee7fd33eb 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -1035,7 +1035,8 @@ substitute_and_fold_engine::propagate_into_phi_args
(basic_block bb)
              || virtual_operand_p (arg))
            continue;
          tree val = get_value (arg, phi);
-         if (val && may_propagate_copy (arg, val))
+         if (val && is_gimple_min_invariant (val)
+             && may_propagate_copy (arg, val))
            propagate_value (use_p, val);
        }
     }

  parent reply	other threads:[~2020-06-16 11:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12  5:45 [Bug tree-optimization/95649] New: ICE during GIMPLE pass: cunroll vsevolod.livinskij at frtk dot ru
2020-06-12  7:28 ` [Bug tree-optimization/95649] [11 Regression] ICE during GIMPLE pass: cunroll since r11-1146-g1396fa5b91cfa0b3 marxin at gcc dot gnu.org
2020-06-12  8:03 ` rguenth at gcc dot gnu.org
2020-06-14 14:05 ` seurer at linux dot vnet.ibm.com
2020-06-15 17:20 ` aldyh at gcc dot gnu.org
2020-06-15 17:21 ` aldyh at gcc dot gnu.org
2020-06-15 17:21 ` aldyh at gcc dot gnu.org
2020-06-15 18:12 ` aldyh at gcc dot gnu.org
2020-06-15 19:11 ` law at redhat dot com
2020-06-16 11:56 ` aldyh at gcc dot gnu.org [this message]
2020-06-16 14:23 ` law at redhat dot com
2020-06-16 18:51 ` cvs-commit at gcc dot gnu.org
2020-06-16 18:59 ` aldyh 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-95649-4-8jUEEGwnKT@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).