[llvm-commits] [llvm-gcc-4.2] r56632 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Fri Sep 26 00:50:54 PDT 2008
Hi Evan,
> + if (const VectorType *VTy = dyn_cast<VectorType>(Ty)) {
> unsigned NumElements = VTy->getNumElements();
> const Type *EltTy = VTy->getElementType();
> if (EltTy == Type::FloatTy)
> return VectorType::get(Type::Int32Ty, NumElements);
> else if (EltTy == Type::DoubleTy)
> return VectorType::get(Type::Int64Ty, NumElements);
here you can use IntegerType::get to obtain the vector element.
> - }
> + } else
> + return IntegerType::get(Ty->getPrimitiveSizeInBits());
Ciao,
Duncan.
More information about the llvm-commits
mailing list