[llvm] SelectionDAG/expandFMINNUM_FMAXNUM: skips vector if Op is legal for elements (PR #109570)
YunQiang Su via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 28 02:40:40 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();
----------------
wzssyqa wrote:
https://github.com/llvm/llvm-project/issues/110353
https://github.com/llvm/llvm-project/pull/109570
More information about the llvm-commits
mailing list