Simplify SplitVecRes_UnaryOp by removing all the code that is
authorDuncan Sands <baldrick@free.fr>
Wed, 26 Oct 2011 14:11:18 +0000 (14:11 +0000)
committerDuncan Sands <baldrick@free.fr>
Wed, 26 Oct 2011 14:11:18 +0000 (14:11 +0000)
commita921a468542a804ccebb680935175798ac48868b
tree5c32498e5f5afcefacc6e5ca1c622ab076cf16b0
parent644ce53a30360c30034d520fee011d5bf1dc2577
Simplify SplitVecRes_UnaryOp by removing all the code that is
trying to legalize the operand types when only the result type
is required to be legalized - the type legalization machinery
will get round to the operands later if they need legalizing.
There can be a point to legalizing operands in parallel with
the result: when this saves compile time or results in better
code.  There was only one case in which this was true: when
the operand is also split, so keep the logic for that bit.
As a result of this change, additional operand legalization
methods may need to be introduced to handle nodes where the
result and operand types can differ, like SIGN_EXTEND, but
the testsuite doesn't contain any tests where this is the case.
In any case, it seems better to require such methods (and die
with an assert if they doesn't exist) than to quietly produce
wrong code if we forgot to special case the node in
SplitVecRes_UnaryOp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143026 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp