diff options
author | Chris Lattner <sabre@nondot.org> | 2006-03-19 06:47:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-03-19 06:47:21 +0000 |
commit | 79fb91cc69b250d4d7237ff3dd6573e4c68d4c99 (patch) | |
tree | 9818e2fe145ec0ed8f5c0b3440bf8e4291a5ca05 /llvm/lib/CodeGen | |
parent | 9cdc5a0ce75a5e929862cdae686ee4526983cbe0 (diff) | |
download | bcm5719-llvm-79fb91cc69b250d4d7237ff3dd6573e4c68d4c99.tar.gz bcm5719-llvm-79fb91cc69b250d4d7237ff3dd6573e4c68d4c99.zip |
Allow SCALAR_TO_VECTOR to be custom lowered.
llvm-svn: 26867
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 370772faab1..44db3104fd7 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/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(), |