[PATCH] D147299: [InstCombine] Add support for maximum(a,b) + minimum(a,b) => a + b
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 5 23:51:16 PDT 2023
mkazantsev 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);
----------------
We could also match `min(a, b) + max(b, a)`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147299/new/
https://reviews.llvm.org/D147299
More information about the llvm-commits
mailing list