[llvm] [InstCombine] Factorise Add and Min/Max using Distributivity (PR #101717)
Jorge Botto via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 19 14:20:59 PDT 2024
================
@@ -1505,6 +1505,80 @@ foldMinimumOverTrailingOrLeadingZeroCount(Value *I0, Value *I1,
ConstantInt::getTrue(ZeroUndef->getType()));
}
+/// Return whether "X LOp (Y ROp Z)" is always equal to
+/// "(X LOp Y) ROp (X LOp Z)".
+static bool foldIntrinsicUsingDistributiveLaws(Instruction::BinaryOps LOp,
----------------
jf-botto wrote:
Thanks. 100% agree. Fixed.
https://github.com/llvm/llvm-project/pull/101717
More information about the llvm-commits
mailing list