This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/80158] [7 Regression] ICE in all_phi_incrs_profitable
- From: "wschmidt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 23 Mar 2017 15:10:36 +0000
- Subject: [Bug tree-optimization/80158] [7 Regression] ICE in all_phi_incrs_profitable
- Auto-submitted: auto-generated
- References: <bug-80158-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80158
--- Comment #10 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
Pretty certain the problem is in this chunk:
if (bump == 0)
{
tree lhs = gimple_assign_lhs (c->cand_stmt);
gassign *copy_stmt = gimple_build_assign (lhs, basis_name);
gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
gimple_set_location (copy_stmt, gimple_location (c->cand_stmt));
gsi_replace (&gsi, copy_stmt, false);
c->cand_stmt = copy_stmt;
if (dump_file && (dump_flags & TDF_DETAILS))
stmt_to_print = copy_stmt;
}
We need a gimple_set_bb (copy_stmt, gimple_bb (c->cand_stmt)) in here if we're
going to rely on the BB information for dominators subsequently. There may be
other cases like this in the code.