aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-12 04:44:28 +0000
committerChris Lattner <sabre@nondot.org>2007-04-12 04:44:28 +0000
commitc2941779c3ed1ffbe66716c6f6b2a9fc38a5ea7b (patch)
tree4c20b938032f78cfcd93266bd677e2ef8fec77a6 /lib/CodeGen
parent6c284d716ea1d81ba9206e48c7d2590e1b78e89e (diff)
downloadexternal_llvm-c2941779c3ed1ffbe66716c6f6b2a9fc38a5ea7b.zip
external_llvm-c2941779c3ed1ffbe66716c6f6b2a9fc38a5ea7b.tar.gz
external_llvm-c2941779c3ed1ffbe66716c6f6b2a9fc38a5ea7b.tar.bz2
Fix weirdness handling single element vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/TargetLowering.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index f1cd9a5..d72c6eb 100644
--- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/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);