[llvm] [InstCombine] Extend fcmp+select folding to minnum/maxnum intrinsics (PR #112088)
Alexey Bader via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 10:29:02 PDT 2024
================
@@ -3834,11 +3834,13 @@ Instruction *InstCombinerImpl::visitSelectInst(SelectInst &SI) {
// minnum/maxnum intrinsics.
if (SIFPOp->hasNoNaNs() && SIFPOp->hasNoSignedZeros()) {
Value *X, *Y;
- if (match(&SI, m_OrdFMax(m_Value(X), m_Value(Y))))
+ if (match(&SI, m_OrdFMax(m_Value(X), m_Value(Y))) ||
+ match(&SI, m_UnordFMax(m_Value(X), m_Value(Y))))
----------------
bader wrote:
Added new matchers in https://github.com/llvm/llvm-project/pull/112088/commits/1713edf3bb089296013f6fd6acd088bc17dd1dc8.
https://github.com/llvm/llvm-project/pull/112088
More information about the llvm-commits
mailing list