[InstCombine] Fix handling of irreducible loops (PR64259)
Fixes a regression introduced by D75362 for irreducible control flow. In that case, we may visit the predecessor that renders the current block live only later, and incorrectly determine that a block is dead. Instead, switch to using the same DeadEdges based implementation we also use during the main InstCombine iteration. This temporarily regresses some cases that need replacement of dead phi operands with poison, which is currently only done during the main run, but not worklist population. This will be addressed in a followup, to keep it separate from the correctness fix here. Fixes https://github.com/llvm/llvm-project/issues/64259.
Loading
Please sign in to comment