[PATCH] D134142: [InstCombine] Handle integer extension in `select` patterns using the condition as value

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 20 07:21:45 PDT 2022


spatel added a comment.

In D134142#3802599 <https://reviews.llvm.org/D134142#3802599>, @nikic wrote:

> This kinda looks like foldSelectValueEquivalence() with a trivial comparison (i.e. interpret `c` as `c == 1`).

Agree - but we'd have to account for the missing icmp that code is expecting? Not sure that's worth the effort and reduced readability, so this patch LGTM.


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

https://reviews.llvm.org/D134142



More information about the llvm-commits mailing list