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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 21 09:16:04 PST 2021


spatel added a comment.

The code duplication suggests that we should have a common place for this logic (especially if it already exists in SimplifyCFG). 
Could it be added to ValueTracking's isKnownNonZero() or wrap around that? 
It might already be in there under isKnownNonNullFromDominatingCondition(), but we need to fix it up to deal with selects?


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