diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-04-05 06:54:42 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-04-05 06:54:42 +0000 |
| commit | 4a2413a5900b157c28020f3106e2bce0e9e2be57 (patch) | |
| tree | 95b186cb287c29ab6e3d349999bdfe7c45d4f289 /llvm/lib/CodeGen | |
| parent | cc06fa67f159f8b2fa87473bd7565c87cc93cc6a (diff) | |
| download | bcm5719-llvm-4a2413a5900b157c28020f3106e2bce0e9e2be57.tar.gz bcm5719-llvm-4a2413a5900b157c28020f3106e2bce0e9e2be57.zip | |
Make a vector live across blocks have the correct Vec type. This fixes
CodeGen/X86/2006-04-04-CrossBlockCrash.ll
llvm-svn: 27436
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 2f79fe56806..4eb33c163da 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -648,7 +648,8 @@ SDOperand SelectionDAGLowering::getValue(const Value *V) { // Otherwise, if this is a vector, make it available as a generic vector // here. MVT::ValueType PTyElementVT, PTyLegalElementVT; - unsigned NE = TLI.getPackedTypeBreakdown(cast<PackedType>(VTy),PTyElementVT, + const PackedType *PTy = cast<PackedType>(VTy); + unsigned NE = TLI.getPackedTypeBreakdown(PTy, PTyElementVT, PTyLegalElementVT); // Build a VBUILD_VECTOR with the input registers. @@ -684,6 +685,13 @@ SDOperand SelectionDAGLowering::getValue(const Value *V) { Ops.push_back(DAG.getConstant(NE, MVT::i32)); Ops.push_back(DAG.getValueType(PTyLegalElementVT)); N = DAG.getNode(ISD::VBUILD_VECTOR, MVT::Vector, Ops); + + // Finally, use a VBIT_CONVERT to make this available as the appropriate + // vector type. + N = DAG.getNode(ISD::VBIT_CONVERT, MVT::Vector, N, + DAG.getConstant(PTy->getNumElements(), + MVT::i32), + DAG.getValueType(TLI.getValueType(PTy->getElementType()))); } return N; |

