[llvm-commits] [llvm] r58703 - /llvm/trunk/lib/VMCore/ValueTypes.cpp
Dan Gohman
gohman at apple.com
Tue Nov 4 08:19:44 PST 2008
Author: djg
Date: Tue Nov 4 10:19:44 2008
New Revision: 58703
URL: http://llvm.org/viewvc/llvm-project?rev=58703&view=rev
Log:
Duncan pointed out that the Extended case in getTypeForMVT could
be considerably simplified.
Modified:
llvm/trunk/lib/VMCore/ValueTypes.cpp
Modified: llvm/trunk/lib/VMCore/ValueTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ValueTypes.cpp?rev=58703&r1=58702&r2=58703&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/ValueTypes.cpp (original)
+++ llvm/trunk/lib/VMCore/ValueTypes.cpp Tue Nov 4 10:19:44 2008
@@ -121,13 +121,8 @@
const Type *MVT::getTypeForMVT() const {
switch (V) {
default:
- if (isVector())
- return VectorType::get(getVectorElementType().getTypeForMVT(),
- getVectorNumElements());
- if (isInteger())
- return IntegerType::get(getSizeInBits());
- assert(0 && "MVT does not correspond to LLVM type!");
- return Type::VoidTy;
+ assert(isExtended() && "Type is not extended!");
+ return LLVMTy;
case MVT::isVoid: return Type::VoidTy;
case MVT::i1: return Type::Int1Ty;
case MVT::i8: return Type::Int8Ty;
More information about the llvm-commits
mailing list