Changes in directory llvm/lib/CodeGen/SelectionDAG:

LegalizeDAG.cpp updated: 1.317 -> 1.318
---
Log message:

Fix the remaining bugs in the vector expansion rework I commited yesterday.
This fixes CodeGen/Generic/vector.ll


---
Diffs of the changes:  (+5 -4)

 LegalizeDAG.cpp |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.317 
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.318
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.317 Fri Mar 17 19:44:44 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp       Sat Mar 18 18:07:49 2006
@@ -407,7 +407,7 @@
         // Otherwise, this is a multiple element vector that isn't supported.
         // Split it in half and legalize both parts.
         SDOperand X, Y;
-        ExpandOp(Op, X, Y);
+        SplitVectorOp(Op, X, Y);
       }
     }
     break;
@@ -4006,6 +4006,7 @@
   }
   
   switch (Node->getOpcode()) {
+  default: assert(0 && "Unknown vector operation!");
   case ISD::VConstant: {
     std::vector<SDOperand> LoOps(Node->op_begin(), 
Node->op_begin()+NewNumElts);
     LoOps.push_back(NewNumEltsNode);
@@ -4098,10 +4099,10 @@
                          PackVectorOp(Node->getOperand(1), NewVT));
     break;
   case ISD::VLOAD: {
-    SDOperand Ch = LegalizeOp(Node->getOperand(2));   // Legalize the chain.
-    SDOperand Ptr = LegalizeOp(Node->getOperand(3));  // Legalize the pointer.
+    SDOperand Ch = LegalizeOp(Node->getOperand(0));   // Legalize the chain.
+    SDOperand Ptr = LegalizeOp(Node->getOperand(1));  // Legalize the pointer.
     
-    Result = DAG.getLoad(NewVT, Ch, Ptr, Node->getOperand(4));
+    Result = DAG.getLoad(NewVT, Ch, Ptr, Node->getOperand(2));
     
     // Remember that we legalized the chain.
     AddLegalizedOperand(Op.getValue(1), LegalizeOp(Result.getValue(1)));



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to