Fix add-dead-break and add-dead-continue passes to respect dominance (#2838)
The implementation of these passes had overlooked the fact that adding a new edge to a control flow graph can change dominance information. Adding a dead break/continue risks causing uses to no longer be dominated by their definitions. This change introduces various tests to expose such scenarios, and augments the preconditions for these transformations with checks to guard against the situation.
Loading
Please register or sign in to comment