[llvm] [InstCombine] Fold `mul (sext bool X), Y` into `select X, -Y, 0` (PR #84792)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 08:54:51 PDT 2024


nikic wrote:

> > Codegen looks a bit worse
> 
> mul typically takes ~3 cycles. Do you mean we should revert the transform to reduce code size?

Hm, good point. Then it's fine, at least for architectures with cmov.

https://github.com/llvm/llvm-project/pull/84792


More information about the llvm-commits mailing list