[PATCH] D126040: [InstCombine] Fold a mul with bool value into and

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 22 08:49:56 PDT 2022


nikic added a comment.

In D126040#3529149 <https://reviews.llvm.org/D126040#3529149>, @xbolva00 wrote:

> Botan AES-128 benchmark, maybe others..

As far as I can tell, this wouldn't help Botan AES-128, because it needs the variant where only one of the operands is 0/1. That does look more generally useful, but is also somewhat unclear from a canonicalization perspective, because it increases instruction count. (We'd probably want to represent it as `trunc(X) ? Y : 0` rather than `-X & Y`, but it's increasing the count either way.)


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

https://reviews.llvm.org/D126040



More information about the llvm-commits mailing list