Lines Matching defs:ToType
326 Value *ConvertScalar_ExtractValue(Value *NV, Type *ToType,
759 /// ConvertScalar_ExtractValue - Extract a value of type ToType from an integer
761 /// Offset. This returns the value, which is of type ToType.
770 ConvertScalar_ExtractValue(Value *FromVal, Type *ToType,
775 if (FromType == ToType && Offset == 0)
782 unsigned ToTypeSize = DL.getTypeAllocSize(ToType);
784 return Builder.CreateBitCast(FromVal, ToType);
805 if (V->getType() != ToType)
806 V = Builder.CreateBitCast(V, ToType);
810 // If ToType is a first class aggregate, extract out each of the pieces and
812 if (StructType *ST = dyn_cast<StructType>(ToType)) {
826 if (ArrayType *AT = dyn_cast<ArrayType>(ToType)) {
851 DL.getTypeStoreSizeInBits(ToType) - Offset;
867 unsigned LIBitWidth = DL.getTypeSizeInBits(ToType);
878 if (ToType->isIntegerTy()) {
880 } else if (ToType->isFloatingPointTy() || ToType->isVectorTy()) {
882 FromVal = Builder.CreateBitCast(FromVal, ToType);
885 FromVal = Builder.CreateIntToPtr(FromVal, ToType);
887 assert(FromVal->getType() == ToType && "Didn't convert right?");