Lines Matching refs:SrcTy
2273 Type* SrcTy = getOperand(0)->getType();
2275 if (SrcTy == DstTy)
2279 if (SrcTy->isPointerTy())
2293 Type *SrcTy,
2317 SrcTy->getScalarSizeInBits();
2342 /// * %F = firstOpcode SrcTy %x to MidTy
2345 /// * %Replacement = resultOpcode %SrcTy %x to DstTy
2349 Type *SrcTy, Type *MidTy, Type *DstTy, Type *SrcIntPtrTy, Type *MidIntPtrTy,
2413 if ((IsFirstBitcast && isa<VectorType>(SrcTy) != isa<VectorType>(MidTy)) ||
2434 if (!SrcTy->isVectorTy() && DstTy->isIntegerTy())
2444 // No-op cast in first op implies secondOp as long as the SrcTy
2446 if (SrcTy->isIntegerTy())
2450 // No-op cast in first op implies secondOp as long as the SrcTy
2452 if (SrcTy->isFloatingPointTy())
2457 if (SrcTy->getPointerAddressSpace() != DstTy->getPointerAddressSpace())
2477 // ext, trunc -> bitcast, if the SrcTy and DstTy are same size
2478 // ext, trunc -> ext, if sizeof(SrcTy) < sizeof(DstTy)
2479 // ext, trunc -> trunc, if sizeof(SrcTy) > sizeof(DstTy)
2480 unsigned SrcSize = SrcTy->getScalarSizeInBits();
2494 if (SrcTy == DstTy)
2502 unsigned SrcSize = SrcTy->getScalarSizeInBits();
2511 if (SrcTy->getPointerAddressSpace() != DstTy->getPointerAddressSpace())
2520 SrcTy->isPtrOrPtrVectorTy() &&
2523 SrcTy->getPointerAddressSpace() != MidTy->getPointerAddressSpace() &&
2531 if (SrcTy->getPointerElementType() == DstTy->getPointerElementType())
2540 SrcTy->isIntOrIntVectorTy() &&
2552 SrcTy->isPtrOrPtrVectorTy() &&
2555 SrcTy->getPointerAddressSpace() == MidTy->getPointerAddressSpace() &&
2791 bool CastInst::isCastable(Type *SrcTy, Type *DestTy) {
2792 if (!SrcTy->isFirstClassType() || !DestTy->isFirstClassType())
2795 if (SrcTy == DestTy)
2798 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy))
2802 SrcTy = SrcVecTy->getElementType();
2807 unsigned SrcBits = SrcTy->getPrimitiveSizeInBits(); // 0 for ptr
2812 if (SrcTy->isIntegerTy()) // Casting from integral
2814 if (SrcTy->isFloatingPointTy()) // Casting from floating pt
2816 if (SrcTy->isVectorTy()) // Casting from vector
2819 return SrcTy->isPointerTy();
2822 if (SrcTy->isIntegerTy()) // Casting from integral
2824 if (SrcTy->isFloatingPointTy()) // Casting from floating pt
2826 if (SrcTy->isVectorTy()) // Casting from vector
2834 if (SrcTy->isPointerTy()) // Casting from pointer
2836 return SrcTy->isIntegerTy(); // Casting from integral
2839 if (SrcTy->isVectorTy())
2846 bool CastInst::isBitCastable(Type *SrcTy, Type *DestTy) {
2847 if (!SrcTy->isFirstClassType() || !DestTy->isFirstClassType())
2850 if (SrcTy == DestTy)
2853 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy)) {
2857 SrcTy = SrcVecTy->getElementType();
2864 if (PointerType *SrcPtrTy = dyn_cast<PointerType>(SrcTy)) {
2869 unsigned SrcBits = SrcTy->getPrimitiveSizeInBits(); // 0 for ptr
2880 if (DestTy->isX86_MMXTy() || SrcTy->isX86_MMXTy())
2886 bool CastInst::isBitOrNoopPointerCastable(Type *SrcTy, Type *DestTy,
2888 SrcTy))
2892 if (auto *IntTy = dyn_cast<IntegerType>(SrcTy))
2895 return isBitCastable(SrcTy, DestTy);
2908 Type *SrcTy = Src->getType();
2910 assert(SrcTy->isFirstClassType() && DestTy->isFirstClassType() &&
2913 if (SrcTy == DestTy)
2917 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy))
2922 SrcTy = SrcVecTy->getElementType();
2927 unsigned SrcBits = SrcTy->getPrimitiveSizeInBits(); // 0 for ptr
2932 if (SrcTy->isIntegerTy()) { // Casting from integral
2943 } else if (SrcTy->isFloatingPointTy()) { // Casting from floating pt
2948 } else if (SrcTy->isVectorTy()) {
2953 assert(SrcTy->isPointerTy() &&
2958 if (SrcTy->isIntegerTy()) { // Casting from integral
2963 } else if (SrcTy->isFloatingPointTy()) { // Casting from floating pt
2971 } else if (SrcTy->isVectorTy()) {
2982 if (SrcTy->isPointerTy()) {
2983 if (DestTy->getPointerAddressSpace() != SrcTy->getPointerAddressSpace())
2986 } else if (SrcTy->isIntegerTy()) {
2991 if (SrcTy->isVectorTy()) {
3012 Type *SrcTy = S->getType();
3014 if (!SrcTy->isFirstClassType() || !DstTy->isFirstClassType() ||
3015 SrcTy->isAggregateType() || DstTy->isAggregateType())
3019 unsigned SrcBitSize = SrcTy->getScalarSizeInBits();
3025 unsigned SrcLength = SrcTy->isVectorTy() ?
3026 cast<VectorType>(SrcTy)->getNumElements() : 0;
3034 return SrcTy->isIntOrIntVectorTy() && DstTy->isIntOrIntVectorTy() &&
3037 return SrcTy->isIntOrIntVectorTy() && DstTy->isIntOrIntVectorTy() &&
3040 return SrcTy->isIntOrIntVectorTy() && DstTy->isIntOrIntVectorTy() &&
3043 return SrcTy->isFPOrFPVectorTy() && DstTy->isFPOrFPVectorTy() &&
3046 return SrcTy->isFPOrFPVectorTy() && DstTy->isFPOrFPVectorTy() &&
3050 return SrcTy->isIntOrIntVectorTy() && DstTy->isFPOrFPVectorTy() &&
3054 return SrcTy->isFPOrFPVectorTy() && DstTy->isIntOrIntVectorTy() &&
3057 if (isa<VectorType>(SrcTy) != isa<VectorType>(DstTy))
3059 if (VectorType *VT = dyn_cast<VectorType>(SrcTy))
3062 return SrcTy->getScalarType()->isPointerTy() &&
3065 if (isa<VectorType>(SrcTy) != isa<VectorType>(DstTy))
3067 if (VectorType *VT = dyn_cast<VectorType>(SrcTy))
3070 return SrcTy->getScalarType()->isIntegerTy() &&
3073 PointerType *SrcPtrTy = dyn_cast<PointerType>(SrcTy->getScalarType());
3084 return SrcTy->getPrimitiveSizeInBits() == DstTy->getPrimitiveSizeInBits();
3091 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy)) {
3101 PointerType *SrcPtrTy = dyn_cast<PointerType>(SrcTy->getScalarType());
3112 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy)) {