]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/107876 - unswitching of switch
authorRichard Biener <rguenther@suse.de>
Mon, 28 Nov 2022 08:19:33 +0000 (09:19 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 28 Nov 2022 09:04:42 +0000 (10:04 +0100)
commit238cf114de16518c6569f0cdd2c4d6211ac98a74
treef2d074e9a906b6019c3e3f9649ae8782ea172f09
parent0976b012d89e3d819d83cdaf0dab05925b3eb3a0
tree-optimization/107876 - unswitching of switch

The following shows a missed update of dominators when unswitching
removes unreachable edges from switch stmts it unswitches.  Fixed
by wiping dominator info in that case.

PR tree-optimization/107876
* tree-ssa-loop-unswitch.cc (clean_up_after_unswitching): Wipe
dominator info if we removed an edge.

* g++.dg/tree-ssa/pr107876.C: New testcase.
gcc/testsuite/g++.dg/tree-ssa/pr107876.C [new file with mode: 0644]
gcc/tree-ssa-loop-unswitch.cc