Lines Matching defs:OldTy
1906 static bool canConvertValue(const DataLayout &DL, Type *OldTy, Type *NewTy) {
1907 if (OldTy == NewTy)
1913 if (isa<IntegerType>(OldTy) && isa<IntegerType>(NewTy)) {
1914 assert(cast<IntegerType>(OldTy)->getBitWidth() !=
1921 DL.getTypeSizeInBits(OldTy).getFixedValue())
1923 if (!NewTy->isSingleValueType() || !OldTy->isSingleValueType())
1928 OldTy = OldTy->getScalarType();
1930 if (NewTy->isPointerTy() || OldTy->isPointerTy()) {
1931 if (NewTy->isPointerTy() && OldTy->isPointerTy()) {
1932 unsigned OldAS = OldTy->getPointerAddressSpace();
1945 if (OldTy->isIntegerTy())
1950 if (!DL.isNonIntegralPointerType(OldTy))
1956 if (OldTy->isTargetExtTy() || NewTy->isTargetExtTy())
1970 Type *OldTy = V->getType();
1971 assert(canConvertValue(DL, OldTy, NewTy) && "Value not convertable to type");
1973 if (OldTy == NewTy)
1976 assert(!(isa<IntegerType>(OldTy) && isa<IntegerType>(NewTy)) &&
1980 if (OldTy->isIntOrIntVectorTy() && NewTy->isPtrOrPtrVectorTy()) {
1990 if (OldTy->isPtrOrPtrVectorTy() && NewTy->isIntOrIntVectorTy()) {
1995 return IRB.CreateBitCast(IRB.CreatePtrToInt(V, DL.getIntPtrType(OldTy)),
1999 if (OldTy->isPtrOrPtrVectorTy() && NewTy->isPtrOrPtrVectorTy()) {
2000 unsigned OldAS = OldTy->getPointerAddressSpace();
2010 return IRB.CreateIntToPtr(IRB.CreatePtrToInt(V, DL.getIntPtrType(OldTy)),