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

tree-optimization/110228 - avoid undefs in ifcombine more thoroughly

The following replaces the simplistic gimple_uses_undefined_value_p
with the conservative mark_ssa_maybe_undefs approach as already
used by LIM and IVOPTs.  This is to avoid exposing an unconditional
uninitialized read on a path from entry by if-combine.

	PR tree-optimization/110228
	* tree-ssa-ifcombine.cc (pass_tree_ifcombine::execute):
	Mark SSA may-undefs.
	(bb_no_side_effects_p): Check stmt uses for undefs.

	* gcc.dg/torture/pr110228.c: New testcase.
	* gcc.dg/uninit-pr101912.c: Un-XFAIL.
parent 729aa4fa
No related branches found
No related tags found
No related merge requests found
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