[InstCombine] Fold `select` of `srem` and conditional add
Simplify a pattern that may show up when computing the remainder of euclidean division. Particularly, when the divisor is a power of two and never negative, the signed remainder can be folded with a bitwise and. Fixes 64305. Proofs: https://alive2.llvm.org/ce/z/9_KG6c Differential Revision: https://reviews.llvm.org/D156811
Loading
Please sign in to comment