- Skip unreachable predecessors during header detection in SCC. Those unreachable blocks would be generated in the switch lowering pass in the corner cases or other frontends. Even though they could be removed through the CFG simplification, we should skip them during header detection.
- rG0b4cf802fad4: [fix-irreducible] Skip unreachable predecessors.
@cdevadas reported that other parts of the AMDGPU backend are also affected by the unreachable blocks being produced in the switch lowering. Instead of fixing each such pass separately, it seems the best way forward it to put the block elimination earlier in the flow. @cdevadas is already working on such a change.
I understand the cleanup of switch-lower pass could avoid the issue. But, as a general pass, it should be prepared to handle the general cases similar to other general passes. Also, it's a blocking issue to our schedule. Could you review this trivial change?