Skip to content

Commit aeb10f8

Browse files
committed
Kill known equivalences before a new assignment in the path solver.
Every time we have a killing statement, we must also kill the relations seen so far. This is similar to what we did for the equivs inherent in PHIs along a path. Tested on x86-64 and ppc64le Linux. gcc/ChangeLog: * gimple-range-path.cc (path_range_query::range_defined_in_block): Call killing_def.
1 parent 2f0b6a9 commit aeb10f8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

gcc/gimple-range-path.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,14 @@ path_range_query::range_defined_in_block (irange &r, tree name, basic_block bb)
288288

289289
if (gimple_code (def_stmt) == GIMPLE_PHI)
290290
ssa_range_in_phi (r, as_a<gphi *> (def_stmt));
291-
else if (!range_of_stmt (r, def_stmt, name))
292-
r.set_varying (TREE_TYPE (name));
291+
else
292+
{
293+
if (name)
294+
get_path_oracle ()->killing_def (name);
295+
296+
if (!range_of_stmt (r, def_stmt, name))
297+
r.set_varying (TREE_TYPE (name));
298+
}
293299

294300
if (bb)
295301
m_non_null.adjust_range (r, name, bb);

0 commit comments

Comments
 (0)