[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:40:45 PDT 2024
================
@@ -3872,6 +3872,10 @@ Instruction *InstCombinerImpl::visitOr(BinaryOperator &I) {
}
}
+ if (cast<PossiblyDisjointInst>(I).isDisjoint())
----------------
nikic wrote:
We should probably have something like visitAddLike that is called from both visitAdd and visitOr where we can place folds we want to apply both to add and or disjoint?
https://github.com/llvm/llvm-project/pull/76285
More information about the llvm-commits
mailing list