[PATCH] D105363: [InstCombine] Transitively propagate `unreachable` into predecessors

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 8 11:50:35 PDT 2021


lebedev.ri added a comment.

In D105363#2865153 <https://reviews.llvm.org/D105363#2865153>, @spatel wrote:

> In D105363#2863232 <https://reviews.llvm.org/D105363#2863232>, @lebedev.ri wrote:
>
>> @spatel thoughts?
>
> I haven't closely followed the related patches, so I'm probably not adding much here...
> But if I run -simplifycfg on any of the tests with diffs here, they are completely zapped down to a single `unreachable`. 
> Can you add a test to demonstrate where we might fall through the cracks of both passes? (possibly a test for PhaseOrdering)

I'm not really sure if there is any pattern that fits your description.
The goal/question here is mostly: should we, the instcombine, be able to get rid of more known-dead code,
potentially allowing further folds, without deferring until the next time instcombine runs after simplifycfg runs after us?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105363/new/

https://reviews.llvm.org/D105363



More information about the llvm-commits mailing list