[llvm] SelectionDAG/createSelectForFMINNUM_FMAXNUM: skips vector if SETCC/VSELECT is not legal while Op is legal for elements (PR #109570)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 7 10:39:20 PDT 2024
================
@@ -8424,6 +8424,12 @@ TargetLowering::createSelectForFMINNUM_FMAXNUM(SDNode *Node,
if (Node->getFlags().hasNoNaNs()) {
ISD::CondCode Pred = Opcode == ISD::FMINNUM ? ISD::SETLT : ISD::SETGT;
+ EVT VT = Node->getValueType(0);
+ if ((!isCondCodeLegal(Pred, VT.getSimpleVT()) ||
+ !isOperationLegalOrCustom(ISD::VSELECT, VT)) &&
+ VT.isVector() &&
+ isOperationLegal(Node->getOpcode(), VT.getScalarType()))
----------------
arsenm wrote:
Can you remove the check about the scalar type? The point was to check positively for the legality of the operations you are directly introducing, not the speculative operations that may be introduced later
https://github.com/llvm/llvm-project/pull/109570
More information about the llvm-commits
mailing list