diff options
author | Chris Lattner <sabre@nondot.org> | 2007-04-12 04:44:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-04-12 04:44:28 +0000 |
commit | 784a68a702ed4e6656c422ae0ed439f71d45ca1e (patch) | |
tree | d8566de98b2a4b88b8c9c734673ef572a5ad484d /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | 2805bce6562ac677d358d3698f82929c83513331 (diff) | |
download | bcm5719-llvm-784a68a702ed4e6656c422ae0ed439f71d45ca1e.tar.gz bcm5719-llvm-784a68a702ed4e6656c422ae0ed439f71d45ca1e.zip |
Fix weirdness handling single element vectors.
llvm-svn: 35941
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index f1cd9a58a2f..d72c6eb01d4 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -303,12 +303,9 @@ unsigned TargetLowering::getVectorTypeBreakdown(const VectorType *PTy, NumVectorRegs <<= 1; } - MVT::ValueType VT; - if (NumElts == 1) { + MVT::ValueType VT = getVectorType(EltTy, NumElts); + if (!isTypeLegal(VT)) VT = EltTy; - } else { - VT = getVectorType(EltTy, NumElts); - } PTyElementVT = VT; MVT::ValueType DestVT = getTypeToTransformTo(VT); |