aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-31 17:37:22 +0000
committerChris Lattner <sabre@nondot.org>2006-03-31 17:37:22 +0000
commit2ae2e98d4f83a02b5e576ec7a0da74d8aebb38cf (patch)
treef8c8446a31aa307ad1feac879d53aa1b90f758b9
parent4c5701d271b624fef11a322e6524ffe03e6bdc70 (diff)
downloadexternal_llvm-2ae2e98d4f83a02b5e576ec7a0da74d8aebb38cf.zip
external_llvm-2ae2e98d4f83a02b5e576ec7a0da74d8aebb38cf.tar.gz
external_llvm-2ae2e98d4f83a02b5e576ec7a0da74d8aebb38cf.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27293 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 93b0d9b..3fe984e 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -1477,6 +1477,9 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
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);