[PATCH] D109194: [InstCombine] Optimize (a & b) | (~a & c)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 3 03:28:49 PDT 2021


RKSimon added a comment.

This is an alternative bit select pattern - do we know if many backends match this pattern as well as the more common (a & b) | (~a & c) to their bit select instructions (bsl/pcmov/etc.)?

The xor pattern is better on SSE for cases where b and c were both constants, plus its entirely commutable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109194



More information about the llvm-commits mailing list