[llvm] r373535 - [LegalizeTypes] Check for already split condition before calilng SplitVecRes_SETCC in SplitRes_SELECT.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 15:34:50 PDT 2019
Author: ctopper
Date: Wed Oct 2 15:34:49 2019
New Revision: 373535
URL: http://llvm.org/viewvc/llvm-project?rev=373535&view=rev
Log:
[LegalizeTypes] Check for already split condition before calilng SplitVecRes_SETCC in SplitRes_SELECT.
No point in manually splitting the SETCC if it was already done.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp?rev=373535&r1=373534&r2=373535&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp Wed Oct 2 15:34:49 2019
@@ -514,15 +514,15 @@ void DAGTypeLegalizer::SplitRes_SELECT(S
if (Cond.getValueType().isVector()) {
if (SDValue Res = WidenVSELECTAndMask(N))
std::tie(CL, CH) = DAG.SplitVector(Res->getOperand(0), dl);
- // It seems to improve code to generate two narrow SETCCs as opposed to
- // splitting a wide result vector.
- else if (Cond.getOpcode() == ISD::SETCC)
- SplitVecRes_SETCC(Cond.getNode(), CL, CH);
// Check if there are already splitted versions of the vector available and
// use those instead of splitting the mask operand again.
else if (getTypeAction(Cond.getValueType()) ==
TargetLowering::TypeSplitVector)
GetSplitVector(Cond, CL, CH);
+ // It seems to improve code to generate two narrow SETCCs as opposed to
+ // splitting a wide result vector.
+ else if (Cond.getOpcode() == ISD::SETCC)
+ SplitVecRes_SETCC(Cond.getNode(), CL, CH);
else
std::tie(CL, CH) = DAG.SplitVector(Cond, dl);
}
More information about the llvm-commits
mailing list