aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-19 06:47:21 +0000
committerChris Lattner <sabre@nondot.org>2006-03-19 06:47:21 +0000
commit4d3abee6183f110c9db56b94b0a4b5f8c985002a (patch)
tree6044f85e8de8bbc6f0f27673c68002090f070ed7
parentce87215131efcc68dcf7fca61055ad783a7aeb0e (diff)
Allow SCALAR_TO_VECTOR to be custom lowered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26867 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 370772faab..44db3104fd 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -783,9 +783,18 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
default: assert(0 && "This action is not supported yet!");
case TargetLowering::Legal:
break;
+ case TargetLowering::Custom:
+ Tmp3 = TLI.LowerOperation(Result, DAG);
+ if (Tmp3.Val) {
+ Result = Tmp3;
+ break;
+ }
+ // FALLTHROUGH
case TargetLowering::Expand: {
// If the target doesn't support this, store the value to a temporary
// stack slot, then EXTLOAD the vector back out.
+ // TODO: If a target doesn't support this, create a stack slot for the
+ // whole vector, then store into it, then load the whole vector.
SDOperand StackPtr =
CreateStackTemporary(Node->getOperand(0).getValueType());
SDOperand Ch = DAG.getNode(ISD::STORE, MVT::Other, DAG.getEntryNode(),