diff options
| author | Craig Topper <craig.topper@intel.com> | 2019-10-02 22:34:49 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@intel.com> | 2019-10-02 22:34:49 +0000 |
| commit | 2772b970e30ac2ca17b723f2e0bfac0dd0c99b80 (patch) | |
| tree | b3fb863126431dd4f447a2967c14deed12e269ea | |
| parent | 641ecbd014f635dec5414d18f97fab6ffcc64b35 (diff) | |
| download | bcm5719-llvm-2772b970e30ac2ca17b723f2e0bfac0dd0c99b80.tar.gz bcm5719-llvm-2772b970e30ac2ca17b723f2e0bfac0dd0c99b80.zip | |
[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.
llvm-svn: 373535
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp index eadc388fc9d..560b5729e3d 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp @@ -514,15 +514,15 @@ void DAGTypeLegalizer::SplitRes_SELECT(SDNode *N, SDValue &Lo, SDValue &Hi) { 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); } |

