[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Mar 31 09:37:34 PST 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

LegalizeDAG.cpp updated: 1.344 -> 1.345
---
Log message:

Scalarized vector stores need not be legal, e.g. if the vector element type
needs to be promoted or expanded.  Relegalize the scalar store once created.
This fixes CodeGen/Generic/vector.ll:test1 on non-SSE x86 targets.


---
Diffs of the changes:  (+3 -0)

 LegalizeDAG.cpp |    3 +++
 1 files changed, 3 insertions(+)


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.344 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.345
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.344	Thu Mar 30 20:06:55 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp	Fri Mar 31 11:37:22 2006
@@ -1477,6 +1477,9 @@
           Tmp3 = PackVectorOp(Node->getOperand(1), EVT);
           Result = DAG.UpdateNodeOperands(Result, Tmp1, Tmp3, Tmp2, 
                                           Node->getOperand(3));
+          // The scalarized value type may not be legal, e.g. it might require
+          // promotion or expansion.  Relegalize the scalar store.
+          Result = LegalizeOp(Result);
           break;
         } else {
           SplitVectorOp(Node->getOperand(1), Lo, Hi);






More information about the llvm-commits mailing list