Skip to content
Snippets Groups Projects
Commit 9da2ef36 authored by Richard Biener's avatar Richard Biener
Browse files

tree-optimization/110298 - CFG cleanup and stale nb_iterations

When unrolling we eventually kill nb_iterations info since it may
refer to removed SSA names.  But we do this only after cleaning
up the CFG which in turn can end up accessing it.  Fixed by
swapping the two.

	PR tree-optimization/110298
	* tree-ssa-loop-ivcanon.cc (tree_unroll_loops_completely):
	Clear number of iterations info before cleaning up the CFG.

	* gcc.dg/torture/pr110298.c: New testcase.

(cherry picked from commit 916add3b)
parent 0b69fea6
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment