[llvm] [InstCombine] Fold `(X & Mask) == 0 ? TC : FC -> TC binop (X & Mask)` (PR #100437)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 05:35:47 PDT 2024


nikic 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?

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


More information about the llvm-commits mailing list