[NFCI][InstCombine] visitUnreachableInst(): iteratively erase instructions leading...
authorRoman Lebedev <lebedev.ri@gmail.com>
Fri, 2 Jul 2021 14:16:33 +0000 (17:16 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Fri, 2 Jul 2021 14:17:03 +0000 (17:17 +0300)
commitd9d65527c289fb27a9f92f150723bbb3c58e413f
treeba029f68633e4eac84ca26e8cefe7d6a2dc7baad
parent597ccc92ce4b0f90883406d1f78d9d776f602804
[NFCI][InstCombine] visitUnreachableInst(): iteratively erase instructions leading to unreachable

In the original review D87149 it was mentioned that this approach was tried,
and it lead to infinite combine loops, but i'm not seeing anything like that now,
neither in the `check-llvm`, nor on some codebases i tried.

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D105339
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp