Handle back edges better in dead branch elim. (#2417)
* Handle back edges better in dead branch elim. Loop header must have exactly one back edge. Sometimes the branch with the back edge can be folded. However, it should not be folded if it removes the back edge. The code to check this simply avoids folding the branch in the continue block. That needs to be changed to not fold the back edge, wherever it is. At the same time, the branch can be folded if it folds to a branch to the header, because the back edge will still exist. Fixes #2391.
Loading
Please register or sign in to comment