Allow SCALAR_TO_VECTOR to be custom lowered.
authorChris Lattner <sabre@nondot.org>
Sun, 19 Mar 2006 06:47:21 +0000 (06:47 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 19 Mar 2006 06:47:21 +0000 (06:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26867 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index 370772faab111fd2c56793389a34961fde246430..44db3104fd7544c3ad54fe118ffd0ab0f640fec1 100644 (file)
@@ -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(),