Home | History | Annotate | Download | only in IR

Lines Matching refs:SrcTy

2064   Type* SrcTy = getOperand(0)->getType();
2066 if (SrcTy == DstTy)
2070 if (SrcTy->isPointerTy())
2084 Type *SrcTy,
2106 SrcTy->getScalarSizeInBits();
2118 /// * %F = firstOpcode SrcTy %x to MidTy
2121 /// * %Replacement = resultOpcode %SrcTy %x to DstTy
2125 Type *SrcTy, Type *MidTy, Type *DstTy, Type *SrcIntPtrTy, Type *MidIntPtrTy,
2182 bool chainedBitcast = (SrcTy == DstTy && isFirstBitcast && isSecondBitcast);
2185 if ((isFirstBitcast && isa<VectorType>(SrcTy) != isa<VectorType>(MidTy)) ||
2206 if (!SrcTy->isVectorTy() && DstTy->isIntegerTy())
2216 // no-op cast in first op implies secondOp as long as the SrcTy
2218 if (SrcTy->isIntegerTy())
2222 // no-op cast in first op implies secondOp as long as the SrcTy
2224 if (SrcTy->isFloatingPointTy())
2234 SrcTy->getPointerAddressSpace() == DstTy->getPointerAddressSpace())
2246 // ext, trunc -> bitcast, if the SrcTy and DstTy are same size
2247 // ext, trunc -> ext, if sizeof(SrcTy) < sizeof(DstTy)
2248 // ext, trunc -> trunc, if sizeof(SrcTy) > sizeof(DstTy)
2249 unsigned SrcSize = SrcTy->getScalarSizeInBits();
2262 if (SrcTy == DstTy)
2268 PointerType *SrcPtrTy = dyn_cast<PointerType>(SrcTy);
2310 unsigned SrcSize = SrcTy->getScalarSizeInBits();
2504 bool CastInst::isCastable(Type *SrcTy, Type *DestTy) {
2505 if (!SrcTy->isFirstClassType() || !DestTy->isFirstClassType())
2508 if (SrcTy == DestTy)
2511 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy))
2515 SrcTy = SrcVecTy->getElementType();
2520 unsigned SrcBits = SrcTy->getPrimitiveSizeInBits(); // 0 for ptr
2525 if (SrcTy->isIntegerTy()) { // Casting from integral
2527 } else if (SrcTy->isFloatingPointTy()) { // Casting from floating pt
2529 } else if (SrcTy->isVectorTy()) { // Casting from vector
2532 return SrcTy->isPointerTy();
2535 if (SrcTy->isIntegerTy()) { // Casting from integral
2537 } else if (SrcTy->isFloatingPointTy()) { // Casting from floating pt
2539 } else if (SrcTy->isVectorTy()) { // Casting from vector
2547 if (SrcTy->isPointerTy()) { // Casting from pointer
2549 } else if (SrcTy->isIntegerTy()) { // Casting from integral
2555 if (SrcTy->isVectorTy()) {
2565 bool CastInst::isBitCastable(Type *SrcTy, Type *DestTy) {
2566 if (!SrcTy->isFirstClassType() || !DestTy->isFirstClassType())
2569 if (SrcTy == DestTy)
2572 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy)) {
2576 SrcTy = SrcVecTy->getElementType();
2583 if (PointerType *SrcPtrTy = dyn_cast<PointerType>(SrcTy)) {
2588 unsigned SrcBits = SrcTy->getPrimitiveSizeInBits(); // 0 for ptr
2599 if (DestTy->isX86_MMXTy() || SrcTy->isX86_MMXTy())
2615 Type *SrcTy = Src->getType();
2617 assert(SrcTy->isFirstClassType() && DestTy->isFirstClassType() &&
2620 if (SrcTy == DestTy)
2624 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy))
2629 SrcTy = SrcVecTy->getElementType();
2634 unsigned SrcBits = SrcTy->getPrimitiveSizeInBits(); // 0 for ptr
2639 if (SrcTy->isIntegerTy()) { // Casting from integral
2650 } else if (SrcTy->isFloatingPointTy()) { // Casting from floating pt
2655 } else if (SrcTy->isVectorTy()) {
2660 assert(SrcTy->isPointerTy() &&
2665 if (SrcTy->isIntegerTy()) { // Casting from integral
2670 } else if (SrcTy->isFloatingPointTy()) { // Casting from floating pt
2678 } else if (SrcTy->isVectorTy()) {
2689 if (SrcTy->isPointerTy()) {
2692 } else if (SrcTy->isIntegerTy()) {
2697 if (SrcTy->isVectorTy()) {
2718 Type *SrcTy = S->getType();
2721 if (SrcTy == DstTy)
2724 if (!SrcTy->isFirstClassType() || !DstTy->isFirstClassType() ||
2725 SrcTy->isAggregateType() || DstTy->isAggregateType())
2729 unsigned SrcBitSize = SrcTy->getScalarSizeInBits();
2735 unsigned SrcLength = SrcTy->isVectorTy() ?
2736 cast<VectorType>(SrcTy)->getNumElements() : 0;
2744 return SrcTy->isIntOrIntVectorTy() && DstTy->isIntOrIntVectorTy() &&
2747 return SrcTy->isIntOrIntVectorTy() && DstTy->isIntOrIntVectorTy() &&
2750 return SrcTy->isIntOrIntVectorTy() && DstTy->isIntOrIntVectorTy() &&
2753 return SrcTy->isFPOrFPVectorTy() && DstTy->isFPOrFPVectorTy() &&
2756 return SrcTy->isFPOrFPVectorTy() && DstTy->isFPOrFPVectorTy() &&
2760 return SrcTy->isIntOrIntVectorTy() && DstTy->isFPOrFPVectorTy() &&
2764 return SrcTy->isFPOrFPVectorTy() && DstTy->isIntOrIntVectorTy() &&
2767 if (isa<VectorType>(SrcTy) != isa<VectorType>(DstTy))
2769 if (VectorType *VT = dyn_cast<VectorType>(SrcTy))
2772 return SrcTy->getScalarType()->isPointerTy() &&
2775 if (isa<VectorType>(SrcTy) != isa<VectorType>(DstTy))
2777 if (VectorType *VT = dyn_cast<VectorType>(SrcTy))
2780 return SrcTy->getScalarType()->isIntegerTy() &&
2785 if (SrcTy->isPointerTy() != DstTy->isPointerTy())
2791 return SrcTy->getPrimitiveSizeInBits() == DstTy->getPrimitiveSizeInBits();