[PATCH] D96663: [InstCombine] Fold nonnull (select c,null,p) to nonnull p

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 19 22:36:09 PST 2021


xbolva00 added a comment.

In D96663#2571467 <https://reviews.llvm.org/D96663#2571467>, @aqjune wrote:

> In D96663#2562250 <https://reviews.llvm.org/D96663#2562250>, @xbolva00 wrote:
>
>> SimplifyCFG adds llvm.assume for “cond”, we should do it here as well.
>
> It seems SimplifyCFG is introducing `llvm.assume` to preserve information after removing a conditional branch.
> In this case, the nonnull attribute is still there, so it might be okay to do the transformation without introducing assume IMO. What do you think?

But when we remove select, we can remove condition too (if trivially dead) - so maybe worth to preserve info that cond must be true/false?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96663



More information about the llvm-commits mailing list