[llvm] SelectionDAG/expandFMINNUM_FMAXNUM: skips vector if Op is legal for elements (PR #109570)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 00:53:22 PDT 2024
================
@@ -8485,6 +8485,11 @@ SDValue TargetLowering::expandFMINNUM_FMAXNUM(SDNode *Node,
Node->getOperand(1), Node->getFlags());
}
+ // If we have INSN fitting this operation strictly for the elements of the
+ // vector, normally, splitting it is better than compare+select.
+ if (VT.isVector() && isOperationLegal(Node->getOpcode(), VT.getScalarType()))
+ return SDValue();
----------------
arsenm wrote:
Does it work if you check if the vector case is legal in createSelectForFMINNUM_FMAXNUM, for select/setcc?
https://github.com/llvm/llvm-project/pull/109570
More information about the llvm-commits
mailing list