diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-11-22 05:18:07 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-11-22 05:18:07 +0000 |
commit | f62b274a93d4014d56fa3a656f4fac6e7d827358 (patch) | |
tree | eded4b0962962f5c1603f4824d7c57bd83e7e200 /lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp | |
parent | ee287ca22abcce9f769618c107ff3f46aa2d0cba (diff) | |
download | llvm-f62b274a93d4014d56fa3a656f4fac6e7d827358.tar.gz llvm-f62b274a93d4014d56fa3a656f4fac6e7d827358.tar.bz2 llvm-f62b274a93d4014d56fa3a656f4fac6e7d827358.tar.xz |
Merging r195397:
------------------------------------------------------------------------
r195397 | tstellar | 2013-11-21 16:39:23 -0800 (Thu, 21 Nov 2013) | 11 lines
Split SETCC if VSELECT requires splitting too.
This patch is a rewrite of the original patch commited in r194542. Instead of
relying on the type legalizer to do the splitting for us, we now peform the
splitting ourselves in the DAG combiner. This is necessary for the case where
the vector mask is a legal type after promotion and still wouldn't require
splitting.
Patch by: Juergen Ributzka
NOTE: This is a candidate for the 3.4 branch.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp b/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp index 9e97c49ddf..b3174fd373 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp @@ -488,11 +488,11 @@ void DAGTypeLegalizer::SplitRes_SELECT(SDNode *N, SDValue &Lo, SDValue Cond = N->getOperand(0); CL = CH = Cond; if (Cond.getValueType().isVector()) { - if (Cond.getOpcode() == ISD::SETCC) { - assert(Cond.getValueType() == getSetCCResultType(N->getValueType(0)) && - "Condition has not been prepared for split!"); + // Check if there are already splitted versions of the vector available and + // use those instead of splitting the mask operand again. + if (getTypeAction(Cond.getValueType()) == TargetLowering::TypeSplitVector) GetSplitVector(Cond, CL, CH); - } else + else llvm::tie(CL, CH) = DAG.SplitVector(Cond, dl); } |