[llvm] SelectionDAG: createSelectForFMINNUM_FMAXNUM skips vector if Op is legal for elements (PR #109570)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 06:00:22 PDT 2024
================
@@ -8422,6 +8422,10 @@ TargetLowering::createSelectForFMINNUM_FMAXNUM(SDNode *Node,
Opcode == ISD::STRICT_FMINNUM || Opcode == ISD::STRICT_FMAXNUM) &&
"Wrong opcode");
+ EVT VT = Node->getValueType(0);
+ if (VT.isVector() && isOperationLegal(Opcode, VT.getScalarType()))
+ return SDValue();
----------------
arsenm wrote:
This doesn't fit with the name of the function, so does something like this belong in the caller?
Usually this type of decision is made on what is legal for the vector type, not the scalar
https://github.com/llvm/llvm-project/pull/109570
More information about the llvm-commits
mailing list