tree-optimization/96931 - clear ctrl-altering flag more aggressively
The testcase shows that we fail to clear gimple_call_ctrl_altering_p
when the last abnormal edge goes away, causing an edge insert to
a loop header edge when we have preheaders to split the edge
unnecessarily.
The following addresses this by more aggressively clearing the
flag in cleanup_call_ctrl_altering_flag.
2020-09-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/96931
* tree-cfgcleanup.c (cleanup_call_ctrl_altering_flag): If
there's a fallthru edge and no abnormal edge the call is
no longer control-altering.
(cleanup_control_flow_bb): Pass down the BB to
cleanup_call_ctrl_altering_flag.
* gcc.dg/pr96931.c: New testcase.