[llvm] [InstCombine] Simplify `(X / C0) * C1 + (X % C0) * C2` to `(X / C0) * (C1 - C2 * C0) + X * C2` (PR #76285)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 18 23:39:39 PDT 2024
nikic wrote:
As it took me a while to get it: The core of the transform is that `x % c` is `x - x / c * c` (https://alive2.llvm.org/ce/z/I8CBWy).
https://github.com/llvm/llvm-project/pull/76285
More information about the llvm-commits
mailing list