Home
last modified time | relevance | path

Searched refs:DestTy (Results 1 – 25 of 78) sorted by relevance

1234

/llvm-project-15.0.7/llvm/include/llvm/Analysis/
H A DInstSimplifyFolder.h121 if (C->getType() == DestTy) in CreateCast()
123 return ConstFolder.CreateCast(Op, C, DestTy); in CreateCast()
127 if (C->getType() == DestTy) in CreateIntCast()
132 if (C->getType() == DestTy) in CreatePointerCast()
137 if (C->getType() == DestTy) in CreateFPCast()
139 return ConstFolder.CreateFPCast(C, DestTy); in CreateFPCast()
142 return ConstFolder.CreateBitCast(C, DestTy); in CreateBitCast()
151 if (C->getType() == DestTy) in CreateZExtOrBitCast()
156 if (C->getType() == DestTy) in CreateSExtOrBitCast()
161 if (C->getType() == DestTy) in CreateTruncOrBitCast()
[all …]
H A DTargetFolder.h189 Type *DestTy) const override { in CreateCast() argument
190 if (C->getType() == DestTy) in CreateCast()
194 Constant *CreateIntCast(Constant *C, Type *DestTy, in CreateIntCast() argument
196 if (C->getType() == DestTy) in CreateIntCast()
201 if (C->getType() == DestTy) in CreatePointerCast()
206 if (C->getType() == DestTy) in CreateFPCast()
208 return Fold(ConstantExpr::getFPCast(C, DestTy)); in CreateFPCast()
220 if (C->getType() == DestTy) in CreateZExtOrBitCast()
225 if (C->getType() == DestTy) in CreateSExtOrBitCast()
230 if (C->getType() == DestTy) in CreateTruncOrBitCast()
[all …]
H A DConstantFolding.h113 Constant *ConstantFoldCastOperand(unsigned Opcode, Constant *C, Type *DestTy,
186 Constant *ConstantFoldLoadThroughBitcast(Constant *C, Type *DestTy,
/llvm-project-15.0.7/llvm/include/llvm/IR/
H A DNoFolder.h115 Type *DestTy) const override { in CreateCast() argument
116 return CastInst::Create(Op, C, DestTy); in CreateCast()
120 return CastInst::CreatePointerCast(C, DestTy); in CreatePointerCast()
124 Constant *C, Type *DestTy) const override { in CreatePointerBitCastOrAddrSpaceCast() argument
128 Instruction *CreateIntCast(Constant *C, Type *DestTy, in CreateIntCast() argument
134 return CastInst::CreateFPCast(C, DestTy); in CreateFPCast()
138 return CreateCast(Instruction::BitCast, C, DestTy); in CreateBitCast()
142 return CreateCast(Instruction::IntToPtr, C, DestTy); in CreateIntToPtr()
150 return CastInst::CreateZExtOrBitCast(C, DestTy); in CreateZExtOrBitCast()
154 return CastInst::CreateSExtOrBitCast(C, DestTy); in CreateSExtOrBitCast()
[all …]
H A DConstantFolder.h178 Type *DestTy) const override { in CreateCast() argument
179 return ConstantExpr::getCast(Op, C, DestTy); in CreateCast()
183 return ConstantExpr::getPointerCast(C, DestTy); in CreatePointerCast()
191 Constant *CreateIntCast(Constant *C, Type *DestTy, in CreateIntCast() argument
197 return ConstantExpr::getFPCast(C, DestTy); in CreateFPCast()
201 return CreateCast(Instruction::BitCast, C, DestTy); in CreateBitCast()
205 return CreateCast(Instruction::IntToPtr, C, DestTy); in CreateIntToPtr()
209 return CreateCast(Instruction::PtrToInt, C, DestTy); in CreatePtrToInt()
213 return ConstantExpr::getZExtOrBitCast(C, DestTy); in CreateZExtOrBitCast()
217 return ConstantExpr::getSExtOrBitCast(C, DestTy); in CreateSExtOrBitCast()
[all …]
H A DIRBuilderFolder.h78 Type *DestTy) const = 0;
79 virtual Value *CreatePointerCast(Constant *C, Type *DestTy) const = 0;
81 Type *DestTy) const = 0;
82 virtual Value *CreateIntCast(Constant *C, Type *DestTy,
84 virtual Value *CreateFPCast(Constant *C, Type *DestTy) const = 0;
85 virtual Value *CreateBitCast(Constant *C, Type *DestTy) const = 0;
86 virtual Value *CreateIntToPtr(Constant *C, Type *DestTy) const = 0;
87 virtual Value *CreatePtrToInt(Constant *C, Type *DestTy) const = 0;
88 virtual Value *CreateZExtOrBitCast(Constant *C, Type *DestTy) const = 0;
89 virtual Value *CreateSExtOrBitCast(Constant *C, Type *DestTy) const = 0;
[all …]
H A DIRBuilder.h1877 return CreateZExt(V, DestTy, Name);
1892 return CreateSExt(V, DestTy, Name);
1964 if (V->getType() == DestTy)
1973 if (V->getType() == DestTy)
1982 if (V->getType() == DestTy)
1991 if (V->getType() == DestTy)
2000 if (V->getType() == DestTy)
2009 if (V->getType() == DestTy)
2023 if (V->getType() == DestTy)
2032 if (V->getType() == DestTy)
[all …]
H A DAutoUpgrade.h79 Instruction *UpgradeBitCastInst(unsigned Opc, Value *V, Type *DestTy,
85 Constant *UpgradeBitCastExpr(unsigned Opc, Constant *C, Type *DestTy);
H A DConstantFold.h37 Type *DestTy ///< The destination type
/llvm-project-15.0.7/llvm/lib/Transforms/InstCombine/
H A DInstCombineCasts.cpp334 if (SrcTy && DestTy && in commonCastTransforms()
547 Type *DestTy = Trunc.getType(); in narrowFunnelShift() local
643 Type *DestTy = Trunc.getType(); in narrowBinOp() local
785 if ((DestTy->isVectorTy() || shouldChangeType(SrcTy, DestTy)) && in visitTrunc()
834 if (DestTy->isIntegerTy()) { in visitTrunc()
1518 if (shouldChangeType(SrcTy, DestTy) && canEvaluateSExtd(Src, DestTy)) { in visitSExt()
1592 ConstantInt::get(DestTy, DestTy->getScalarSizeInBits()), in visitSExt()
1609 if (XTy == DestTy) in visitSExt()
2747 Type *DestTy = CI.getType(); in visitBitCast() local
2751 if (DestTy == Src->getType()) in visitBitCast()
[all …]
/llvm-project-15.0.7/llvm/tools/llvm-stress/
H A Dllvm-stress.cpp545 Type *DestTy = pickScalarType(); in Act() local
550 DestTy = pickVectorType(VecTy->getNumElements()); in Act()
554 if (VTy == DestTy) return; in Act()
558 if (!DestTy->isPointerTy()) in Act()
559 DestTy = PointerType::get(DestTy, 0); in Act()
561 new BitCastInst(V, DestTy, "PC", BB->getTerminator())); in Act()
570 new BitCastInst(V, DestTy, "BC", BB->getTerminator())); in Act()
577 new TruncInst(V, DestTy, "Tr", BB->getTerminator())); in Act()
582 new ZExtInst(V, DestTy, "ZE", BB->getTerminator())); in Act()
591 new FPToSIInst(V, DestTy, "FC", BB->getTerminator())); in Act()
[all …]
/llvm-project-15.0.7/llvm/utils/TableGen/
H A DCallingConvEmitter.cpp293 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local
294 MVT::SimpleValueType DestVT = getValueType(DestTy); in EmitAction()
307 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local
308 MVT::SimpleValueType DestVT = getValueType(DestTy); in EmitAction()
323 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local
324 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
327 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local
328 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
331 Record *DestTy = Action->getValueAsDef("DestTy"); in EmitAction() local
332 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n"; in EmitAction()
/llvm-project-15.0.7/llvm/include/llvm/CodeGen/GlobalISel/
H A DLegalizationArtifactCombiner.h387 const unsigned DestSize = DestTy.getSizeInBits(); in tryFoldUnmergeCast()
494 return !DestTy.isVector() && OpTy.isVector() && in canFoldMergeOpcode()
495 DestTy == OpTy.getElementType(); in canFoldMergeOpcode()
499 if (!DestTy.isVector()) in canFoldMergeOpcode()
508 return DestTy.getSizeInBits() <= OpEltSize; in canFoldMergeOpcode()
509 return DestTy.getSizeInBits() >= OpEltSize; in canFoldMergeOpcode()
786 LLT DestTy = MRI.getType(MI.getReg(0)); in tryCombineUnmergeDefs() local
798 if (MRI.getType(FoundVal) != DestTy) in tryCombineUnmergeDefs()
824 LLT DestTy = MRI.getType(MI.getReg(0)); in tryCombineUnmergeValues() local
978 if (!ConvertOp && DestTy != MergeSrcTy) in tryCombineUnmergeValues()
[all …]
/llvm-project-15.0.7/llvm/lib/IR/
H A DConstantFold.cpp111 if (SrcTy == DestTy) in FoldBitCast()
167 if (DestTy->isIntegerTy()) in FoldBitCast()
173 if (DestTy->isFloatingPointTy() && !DestTy->isPPC_FP128Ty()) in FoldBitCast()
194 if (!DestTy->isIntegerTy()) in FoldBitCast()
353 return PoisonValue::get(DestTy); in ConstantFoldCastInstruction()
362 return UndefValue::get(DestTy); in ConstantFoldCastInstruction()
365 if (V->isNullValue() && !DestTy->isX86_MMXTy() && !DestTy->isX86_AMXTy() && in ConstantFoldCastInstruction()
405 DestTy->isVectorTy() && in ConstantFoldCastInstruction()
454 return PoisonValue::get(DestTy); in ConstantFoldCastInstruction()
466 return ConstantInt::get(DestTy, 0); in ConstantFoldCastInstruction()
[all …]
H A DCore.cpp3765 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildTrunc() argument
3770 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildZExt() argument
3775 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildSExt() argument
3780 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildFPToUI() argument
3785 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildFPToSI() argument
3790 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildUIToFP() argument
3805 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildFPExt() argument
3848 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildCast() argument
3850 unwrap(DestTy), Name)); in LLVMBuildCast()
3867 return wrap(unwrap(B)->CreateIntCast(unwrap(Val), unwrap(DestTy), in LLVMBuildIntCast()
[all …]
H A DVerifier.cpp2887 Type *DestTy = I.getType(); in visitTruncInst() local
2905 Type *DestTy = I.getType(); in visitZExtInst() local
2923 Type *DestTy = I.getType(); in visitSExtInst() local
2941 Type *DestTy = I.getType(); in visitFPTruncInst() local
2958 Type *DestTy = I.getType(); in visitFPExtInst() local
2976 Type *DestTy = I.getType(); in visitUIToFPInst() local
2999 Type *DestTy = I.getType(); in visitSIToFPInst() local
3022 Type *DestTy = I.getType(); in visitFPToUIInst() local
3044 Type *DestTy = I.getType(); in visitFPToSIInst() local
3066 Type *DestTy = I.getType(); in visitPtrToIntInst() local
[all …]
H A DInstructions.cpp2920 Type *DestTy, in isNoopCast() argument
2941 DestTy->getScalarSizeInBits(); in isNoopCast()
3409 if (SrcTy == DestTy) in isBitCastable()
3417 DestTy = DestVecTy->getElementType(); in isBitCastable()
3452 if (auto *PtrTy = dyn_cast<PointerType>(DestTy)) in isBitOrNoopPointerCastable()
3457 return isBitCastable(SrcTy, DestTy); in isBitOrNoopPointerCastable()
3474 if (SrcTy == DestTy) in getCastOpcode()
3484 DestTy = DestVecTy->getElementType(); in getCastOpcode()
3538 } else if (DestTy->isVectorTy()) { in getCastOpcode()
3542 } else if (DestTy->isPointerTy()) { in getCastOpcode()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/IPO/
H A DMergeFunctions.cpp489 static Value *createCast(IRBuilder<> &Builder, Value *V, Type *DestTy) { in createCast() argument
492 assert(DestTy->isStructTy()); in createCast()
493 assert(SrcTy->getStructNumElements() == DestTy->getStructNumElements()); in createCast()
494 Value *Result = PoisonValue::get(DestTy); in createCast()
498 DestTy->getStructElementType(I)); in createCast()
505 assert(!DestTy->isStructTy()); in createCast()
506 if (SrcTy->isIntegerTy() && DestTy->isPointerTy()) in createCast()
507 return Builder.CreateIntToPtr(V, DestTy); in createCast()
508 else if (SrcTy->isPointerTy() && DestTy->isIntegerTy()) in createCast()
509 return Builder.CreatePtrToInt(V, DestTy); in createCast()
[all …]
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DConstantFolding.cpp114 if (isa<IntegerType>(DestTy) || DestTy->isFloatingPointTy()) { in FoldBitCast()
133 if (isa<IntegerType>(DestTy)) in FoldBitCast()
134 return ConstantInt::get(DestTy, Result); in FoldBitCast()
142 auto *DestVTy = dyn_cast<VectorType>(DestTy); in FoldBitCast()
144 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
155 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
161 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
185 return ConstantExpr::getBitCast(C, DestTy); in FoldBitCast()
352 if (SrcTy == DestTy) in ConstantFoldLoadThroughBitcast()
1029 Type *DestTy = InstOrCE->getType(); in ConstantFoldInstOperandsImpl() local
[all …]
/llvm-project-15.0.7/llvm/include/llvm-c/
H A DCore.h3971 LLVMTypeRef DestTy, const char *Name);
3973 LLVMTypeRef DestTy, const char *Name);
3975 LLVMTypeRef DestTy, const char *Name);
3977 LLVMTypeRef DestTy, const char *Name);
3979 LLVMTypeRef DestTy, const char *Name);
3981 LLVMTypeRef DestTy, const char *Name);
3983 LLVMTypeRef DestTy, const char *Name);
3985 LLVMTypeRef DestTy, const char *Name);
3987 LLVMTypeRef DestTy, const char *Name);
4003 LLVMTypeRef DestTy, const char *Name);
[all …]
/llvm-project-15.0.7/llvm/include/llvm/Target/
H A DTargetCallingConv.td164 ValueType DestTy = destTy;
170 ValueType DestTy = destTy;
176 ValueType DestTy = destTy;
182 ValueType DestTy = destTy;
188 ValueType DestTy = destTy;
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DCGExprScalar.cpp2000 QualType DestTy = CE->getType(); in VisitCastExpr() local
2038 llvm::Type *DstTy = ConvertType(DestTy); in VisitCastExpr()
2166 ConvertType(DestTy)), DestTy); in VisitCastExpr()
2172 DestTy->getPointeeType().getAddressSpace(), ConvertType(DestTy)); in VisitCastExpr()
2185 llvm::Type *T = ConvertType(DestTy); in VisitCastExpr()
2239 DestTy); in VisitCastExpr()
2295 auto DestLLVMTy = ConvertType(DestTy); in VisitCastExpr()
2306 if (DestTy.mayBeDynamicClass()) in VisitCastExpr()
2335 llvm::Type *DstTy = ConvertType(DestTy); in VisitCastExpr()
2364 assert(DestTy->isFixedPointType() && in VisitCastExpr()
[all …]
H A DTargetInfo.h279 LangAS DestAddr, llvm::Type *DestTy,
290 llvm::Type *DestTy) const;
H A DCGExprComplex.cpp176 ComplexPairTy EmitCast(CastKind CK, Expr *Op, QualType DestTy);
457 QualType DestTy) { in EmitCast() argument
473 V = Builder.CreateElementBitCast(V, CGF.ConvertType(DestTy)); in EmitCast()
474 return EmitLoadOfLValue(CGF.MakeAddrLValue(V, DestTy), Op->getExprLoc()); in EmitCast()
480 CGF.ConvertTypeForMem(DestTy)); in EmitCast()
481 LValue DestLV = CGF.MakeAddrLValue(Addr, DestTy); in EmitCast()
543 DestTy, Op->getExprLoc()); in EmitCast()
551 return EmitComplexToComplexCast(Visit(Op), Op->getType(), DestTy, in EmitCast()
/llvm-project-15.0.7/llvm/lib/Target/Hexagon/
H A DHexagonLoopIdiomRecognition.cpp981 IntegerType *DestTy) { in isPromotableTo() argument
983 if (!T || T->getBitWidth() > DestTy->getBitWidth()) in isPromotableTo()
985 if (T->getBitWidth() == DestTy->getBitWidth()) in isPromotableTo()
1019 IntegerType *DestTy, BasicBlock *LoopB) { in promoteTo() argument
1025 In->mutateType(DestTy); in promoteTo()
1026 unsigned DestBW = DestTy->getBitWidth(); in promoteTo()
1079 IntegerType *DestTy = getPmpyType(); in promoteTypes() local
1082 unsigned DestBW = DestTy->getBitWidth(); in promoteTypes()
1094 if (!In.isTerminator() && !isPromotableTo(&In, DestTy)) in promoteTypes()
1103 promoteTo(In, DestTy, LoopB); in promoteTypes()
[all …]

1234