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

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 07:50:03 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).

Sun should be fine because we will convert to `add` (its sub on RHS no?)

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


More information about the llvm-commits mailing list