[llvm] [InstCombine] Fold `(X & Mask) == 0 ? TC : FC -> TC binop (X & Mask)` (PR #100437)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 05:40:21 PDT 2024
goldsteinn wrote:
> > It would be better to only keep the add variant. `imm sub/shl/lshr/ashr X` cannot be encoded in one instruction (e.g., RISC-V/ARM).
>
> Sounds like a good starting point. I assume add was the motivating case anyway?
Yeah if `add` is the motivating case think its fine to only handle that, although think we can fit the `or` and `xor` case into the new loop.
https://github.com/llvm/llvm-project/pull/100437
More information about the llvm-commits
mailing list