From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 85DA0388C02B; Tue, 16 Jun 2020 11:56:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85DA0388C02B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592308606; bh=EgroLUN8ifNOJUvtanreQIsnRKsydmGOjPRpPvSCbnQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lmWVhVdzJiJLKxE6F8FYfXRlShpY22vuZhrMQRo/K53Ajojw9YJ5JPDoF5zONyP5l nligtlKs7ygIr7rjKfoggpAtKbf3cwJIcfC/u6x2DD5y8EaIlQnohbUPUPp4bX/RH9 yTmN+CqnR0ZzNwh/8+6q1r4kDJcWqIH4Ep6qTv7E= From: "aldyh at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: aldyh at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: aldyh at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2020 11:56:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95649 --- Comment #7 from Aldy Hernandez --- 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 =3D 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); } }=