Lines Matching refs:DstTy
2349 Type *DstTy = getType(); in isLosslessCast() local
2350 if (SrcTy == DstTy) in isLosslessCast()
2355 return DstTy->isPointerTy(); in isLosslessCast()
2424 Type *SrcTy, Type *MidTy, Type *DstTy, Type *SrcIntPtrTy, Type *MidIntPtrTy, in isEliminableCastPair() argument
2489 (IsSecondBitcast && isa<VectorType>(MidTy) != isa<VectorType>(DstTy))) in isEliminableCastPair()
2509 if (!SrcTy->isVectorTy() && DstTy->isIntegerTy()) in isEliminableCastPair()
2515 if (DstTy->isFloatingPointTy()) in isEliminableCastPair()
2532 if (SrcTy->getPointerAddressSpace() != DstTy->getPointerAddressSpace()) in isEliminableCastPair()
2556 unsigned DstSize = DstTy->getScalarSizeInBits(); in isEliminableCastPair()
2569 if (SrcTy == DstTy) in isEliminableCastPair()
2578 unsigned DstSize = DstTy->getScalarSizeInBits(); in isEliminableCastPair()
2586 if (SrcTy->getPointerAddressSpace() != DstTy->getPointerAddressSpace()) in isEliminableCastPair()
2597 DstTy->isPtrOrPtrVectorTy() && in isEliminableCastPair()
2599 MidTy->getPointerAddressSpace() == DstTy->getPointerAddressSpace() && in isEliminableCastPair()
2606 if (SrcTy->getPointerElementType() == DstTy->getPointerElementType()) in isEliminableCastPair()
2617 DstTy->isPtrOrPtrVectorTy() && in isEliminableCastPair()
2618 MidTy->getPointerAddressSpace() == DstTy->getPointerAddressSpace() && in isEliminableCastPair()
2629 DstTy->isIntOrIntVectorTy() && in isEliminableCastPair()
3084 CastInst::castIsValid(Instruction::CastOps op, Value *S, Type *DstTy) { in castIsValid() argument
3089 if (!SrcTy->isFirstClassType() || !DstTy->isFirstClassType() || in castIsValid()
3090 SrcTy->isAggregateType() || DstTy->isAggregateType()) in castIsValid()
3095 unsigned DstBitSize = DstTy->getScalarSizeInBits(); in castIsValid()
3102 unsigned DstLength = DstTy->isVectorTy() ? in castIsValid()
3103 cast<VectorType>(DstTy)->getNumElements() : 0; in castIsValid()
3109 return SrcTy->isIntOrIntVectorTy() && DstTy->isIntOrIntVectorTy() && in castIsValid()
3112 return SrcTy->isIntOrIntVectorTy() && DstTy->isIntOrIntVectorTy() && in castIsValid()
3115 return SrcTy->isIntOrIntVectorTy() && DstTy->isIntOrIntVectorTy() && in castIsValid()
3118 return SrcTy->isFPOrFPVectorTy() && DstTy->isFPOrFPVectorTy() && in castIsValid()
3121 return SrcTy->isFPOrFPVectorTy() && DstTy->isFPOrFPVectorTy() && in castIsValid()
3125 return SrcTy->isIntOrIntVectorTy() && DstTy->isFPOrFPVectorTy() && in castIsValid()
3129 return SrcTy->isFPOrFPVectorTy() && DstTy->isIntOrIntVectorTy() && in castIsValid()
3132 if (isa<VectorType>(SrcTy) != isa<VectorType>(DstTy)) in castIsValid()
3135 if (VT->getNumElements() != cast<VectorType>(DstTy)->getNumElements()) in castIsValid()
3138 DstTy->getScalarType()->isIntegerTy(); in castIsValid()
3140 if (isa<VectorType>(SrcTy) != isa<VectorType>(DstTy)) in castIsValid()
3143 if (VT->getNumElements() != cast<VectorType>(DstTy)->getNumElements()) in castIsValid()
3146 DstTy->getScalarType()->isPointerTy(); in castIsValid()
3149 PointerType *DstPtrTy = dyn_cast<PointerType>(DstTy->getScalarType()); in castIsValid()
3159 return SrcTy->getPrimitiveSizeInBits() == DstTy->getPrimitiveSizeInBits(); in castIsValid()
3167 if (VectorType *DstVecTy = dyn_cast<VectorType>(DstTy)) in castIsValid()
3180 PointerType *DstPtrTy = dyn_cast<PointerType>(DstTy->getScalarType()); in castIsValid()
3188 if (VectorType *DstVecTy = dyn_cast<VectorType>(DstTy)) in castIsValid()