[PATCH] D147299: [InstCombine] Add support for maximum(a,b) + minimum(a,b) => a + b
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 5 23:54:13 PDT 2023
skatkov added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp:1811
+ m_c_Intrinsic<Intrinsic::minimum>(m_Deferred(X),
+ m_Deferred(Y))))) {
+ BinaryOperator *Result = BinaryOperator::CreateFAddFMF(X, Y, &I);
----------------
mkazantsev wrote:
> We could also match `min(a, b) + max(b, a)`
we do, see the test @test_comm2.
Actually it was m_c versus m_ does.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147299/new/
https://reviews.llvm.org/D147299
More information about the llvm-commits
mailing list