Searched refs:DestTy (Results 1 - 25 of 75) sorted by relevance

123

/freebsd-current/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DInstSimplifyFolder.h116 Type *DestTy) const override {
117 return simplifyCastInst(Op, V, DestTy, SQ);
124 Value *CreatePointerCast(Constant *C, Type *DestTy) const override {
125 if (C->getType() == DestTy)
127 return ConstFolder.CreatePointerCast(C, DestTy);
131 Type *DestTy) const override {
132 if (C->getType() == DestTy)
134 return ConstFolder.CreatePointerBitCastOrAddrSpaceCast(C, DestTy);
H A DTargetFolder.h188 Type *DestTy) const override {
190 return ConstantFoldCastOperand(Op, C, DestTy, DL);
198 Constant *CreatePointerCast(Constant *C, Type *DestTy) const override {
199 if (C->getType() == DestTy)
201 return Fold(ConstantExpr::getPointerCast(C, DestTy));
205 Type *DestTy) const override {
206 if (C->getType() == DestTy)
208 return Fold(ConstantExpr::getPointerBitCastOrAddrSpaceCast(C, DestTy));
H A DConstantFolding.h114 Constant *ConstantFoldCastOperand(unsigned Opcode, Constant *C, Type *DestTy,
118 /// DestTy is wider or narrower than C. Returns nullptr on failure.
119 Constant *ConstantFoldIntegerCast(Constant *C, Type *DestTy, bool IsSigned,
192 Constant *ConstantFoldLoadThroughBitcast(Constant *C, Type *DestTy,
/freebsd-current/contrib/llvm-project/llvm/include/llvm/IR/
H A DNoFolder.h111 Type *DestTy) const override {
119 Instruction *CreatePointerCast(Constant *C, Type *DestTy) const override {
120 return CastInst::CreatePointerCast(C, DestTy);
124 Constant *C, Type *DestTy) const override {
125 return CastInst::CreatePointerBitCastOrAddrSpaceCast(C, DestTy);
H A DAutoUpgrade.h79 Instruction *UpgradeBitCastInst(unsigned Opc, Value *V, Type *DestTy,
85 Constant *UpgradeBitCastExpr(unsigned Opc, Constant *C, Type *DestTy);
H A DConstantFolder.h177 Type *DestTy) const override {
180 return ConstantExpr::getCast(Op, C, DestTy);
181 return ConstantFoldCastInstruction(Op, C, DestTy);
190 Constant *CreatePointerCast(Constant *C, Type *DestTy) const override {
191 return ConstantExpr::getPointerCast(C, DestTy);
195 Type *DestTy) const override {
196 return ConstantExpr::getPointerBitCastOrAddrSpaceCast(C, DestTy);
H A DIRBuilderFolder.h74 Type *DestTy) const = 0;
80 virtual Value *CreatePointerCast(Constant *C, Type *DestTy) const = 0;
82 Type *DestTy) const = 0;
H A DIRBuilder.h2006 Value *CreateTrunc(Value *V, Type *DestTy, const Twine &Name = "") { argument
2007 return CreateCast(Instruction::Trunc, V, DestTy, Name);
2010 Value *CreateZExt(Value *V, Type *DestTy, const Twine &Name = "", argument
2012 if (V->getType() == DestTy)
2014 if (Value *Folded = Folder.FoldCast(Instruction::ZExt, V, DestTy))
2016 Instruction *I = Insert(new ZExtInst(V, DestTy), Name);
2022 Value *CreateSExt(Value *V, Type *DestTy, const Twine &Name = "") { argument
2023 return CreateCast(Instruction::SExt, V, DestTy, Name);
2026 /// Create a ZExt or Trunc from the integer value V to DestTy. Return
2027 /// the value untouched if the type of V is already DestTy
2028 CreateZExtOrTrunc(Value *V, Type *DestTy, const Twine &Name = �) argument
2043 CreateSExtOrTrunc(Value *V, Type *DestTy, const Twine &Name = �) argument
2056 CreateFPToUI(Value *V, Type *DestTy, const Twine &Name = �) argument
2063 CreateFPToSI(Value *V, Type *DestTy, const Twine &Name = �) argument
2070 CreateUIToFP(Value *V, Type *DestTy, const Twine &Name = �) argument
2077 CreateSIToFP(Value *V, Type *DestTy, const Twine &Name = �) argument
2084 CreateFPTrunc(Value *V, Type *DestTy, const Twine &Name = �) argument
2093 CreateFPExt(Value *V, Type *DestTy, const Twine &Name = �) argument
2100 CreatePtrToInt(Value *V, Type *DestTy, const Twine &Name = �) argument
2105 CreateIntToPtr(Value *V, Type *DestTy, const Twine &Name = �) argument
2110 CreateBitCast(Value *V, Type *DestTy, const Twine &Name = �) argument
2115 CreateAddrSpaceCast(Value *V, Type *DestTy, const Twine &Name = �) argument
2120 CreateZExtOrBitCast(Value *V, Type *DestTy, const Twine &Name = �) argument
2128 CreateSExtOrBitCast(Value *V, Type *DestTy, const Twine &Name = �) argument
2136 CreateTruncOrBitCast(Value *V, Type *DestTy, const Twine &Name = �) argument
2144 CreateCast(Instruction::CastOps Op, Value *V, Type *DestTy, const Twine &Name = �) argument
2153 CreatePointerCast(Value *V, Type *DestTy, const Twine &Name = �) argument
2165 CreatePointerBitCastOrAddrSpaceCast(Value *V, Type *DestTy, const Twine &Name = �) argument
2179 CreateIntCast(Value *V, Type *DestTy, bool isSigned, const Twine &Name = �) argument
2188 CreateBitOrPointerCast(Value *V, Type *DestTy, const Twine &Name = �) argument
2200 CreateFPCast(Value *V, Type *DestTy, const Twine &Name = �) argument
[all...]
H A DConstantFold.h37 Type *DestTy ///< The destination type
/freebsd-current/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineCasts.cpp211 auto *DestTy = dyn_cast<FixedVectorType>(Ty); local
212 if (SrcTy && DestTy &&
213 SrcTy->getNumElements() == DestTy->getNumElements() &&
214 SrcTy->getPrimitiveSizeInBits() == DestTy->getPrimitiveSizeInBits()) {
215 Value *CastX = Builder.CreateCast(CI.getOpcode(), X, DestTy);
440 Type *DestTy = Trunc.getType(); local
441 unsigned NarrowWidth = DestTy->getScalarSizeInBits();
523 Value *NarrowShAmt = Builder.CreateZExtOrTrunc(ShAmt, DestTy);
526 X = Y = Builder.CreateTrunc(ShVal0, DestTy);
528 Y = Builder.CreateTrunc(ShVal1, DestTy);
538 Type *DestTy = Trunc.getType(); local
674 Type *DestTy = Trunc.getType(), *SrcTy = Src->getType(); local
1116 Type *SrcTy = Src->getType(), *DestTy = Zext.getType(); local
1400 Type *SrcTy = Src->getType(), *DestTy = Sext.getType(); local
2022 optimizeVectorResizeWithIntegerBitCasts(Value *InVal, VectorType *DestTy, InstCombinerImpl &IC) argument
2282 Type *DestTy = BitCast.getType(); local
2361 Type *DestTy = BitCast.getType(); local
2419 Type *DestTy = CI.getType(); // Type A local
2584 Type *DestTy = CI.getType(); local
[all...]
/freebsd-current/contrib/llvm-project/llvm/utils/TableGen/
H A DCallingConvEmitter.cpp298 Record *DestTy = Action->getValueAsDef("DestTy"); local
299 MVT::SimpleValueType DestVT = getValueType(DestTy);
312 Record *DestTy = Action->getValueAsDef("DestTy"); local
313 MVT::SimpleValueType DestVT = getValueType(DestTy);
328 Record *DestTy = Action->getValueAsDef("DestTy"); local
329 O << IndentStr << "LocVT = " << getEnumName(getValueType(DestTy)) <<";\n";
332 Record *DestTy local
336 Record *DestTy = Action->getValueAsDef("DestTy"); local
[all...]
/freebsd-current/contrib/llvm-project/llvm/tools/llvm-stress/
H A Dllvm-stress.cpp545 Type *DestTy = pickScalarType(); variable
549 DestTy = pickVectorType(cast<VectorType>(VTy));
552 if (VTy == DestTy) return;
556 if (!DestTy->isPointerTy())
557 DestTy = PointerType::get(DestTy, 0);
559 new BitCastInst(V, DestTy, "PC", BB->getTerminator()));
563 unsigned DestSize = DestTy->getScalarType()->getPrimitiveSizeInBits();
568 new BitCastInst(V, DestTy, "BC", BB->getTerminator()));
572 if (VTy->isIntOrIntVectorTy() && DestTy
[all...]
/freebsd-current/contrib/llvm-project/clang/lib/CodeGen/
H A DTargetInfo.cpp134 LangAS DestAddr, llvm::Type *DestTy, bool isNonNull) const {
138 return performAddrSpaceCast(CGF.CGM, C, SrcAddr, DestAddr, DestTy);
141 Src, DestTy, Src->hasName() ? Src->getName() + ".ascast" : "");
147 llvm::Type *DestTy) const {
150 return llvm::ConstantExpr::getPointerCast(Src, DestTy);
132 performAddrSpaceCast( CodeGen::CodeGenFunction &CGF, llvm::Value *Src, LangAS SrcAddr, LangAS DestAddr, llvm::Type *DestTy, bool isNonNull) const argument
H A DCGExprScalar.cpp2047 QualType DestTy = CE->getType(); local
2066 Addr = Addr.withElementType(CGF.ConvertTypeForMem(DestTy));
2067 LValue LV = CGF.MakeAddrLValue(Addr, DestTy);
2074 CGF.ConvertTypeForMem(DestTy));
2075 LValue DestLV = CGF.MakeAddrLValue(Addr, DestTy);
2086 llvm::Type *DstTy = ConvertType(DestTy);
2093 if (auto *PT = DestTy->getAs<PointerType>()) {
2108 if (SrcType.mayBeNotDynamicClass() && DestTy.mayBeDynamicClass()) {
2112 } else if (SrcType.mayBeDynamicClass() && DestTy.mayBeNotDynamicClass()) {
2127 QualType PointeeType = DestTy
[all...]
H A DTargetInfo.h297 /// \param DestTy is the destination LLVM pointer type.
301 LangAS DestAddr, llvm::Type *DestTy,
308 /// \param DestTy is the destination LLVM pointer type.
312 llvm::Type *DestTy) const;
/freebsd-current/contrib/llvm-project/llvm/lib/IR/
H A DConstantFold.cpp70 static Constant *FoldBitCast(Constant *V, Type *DestTy) { argument
72 if (SrcTy == DestTy)
77 if (VectorType *DestPTy = dyn_cast<VectorType>(DestTy)) {
79 return Constant::getAllOnesValue(DestTy);
92 if (DestTy->isFloatingPointTy() && !DestTy->isPPC_FP128Ty())
93 return ConstantFP::get(DestTy->getContext(),
94 APFloat(DestTy->getFltSemantics(),
113 if (!DestTy->isIntegerTy())
184 Type *DestTy) {
183 foldMaybeUndesirableCast(unsigned opc, Constant *V, Type *DestTy) argument
190 ConstantFoldCastInstruction(unsigned opc, Constant *V, Type *DestTy) argument
[all...]
H A DCore.cpp3837 LLVMTypeRef DestTy, const char *Name) {
3838 return wrap(unwrap(B)->CreateTrunc(unwrap(Val), unwrap(DestTy), Name));
3842 LLVMTypeRef DestTy, const char *Name) {
3843 return wrap(unwrap(B)->CreateZExt(unwrap(Val), unwrap(DestTy), Name));
3847 LLVMTypeRef DestTy, const char *Name) {
3848 return wrap(unwrap(B)->CreateSExt(unwrap(Val), unwrap(DestTy), Name));
3852 LLVMTypeRef DestTy, const char *Name) {
3853 return wrap(unwrap(B)->CreateFPToUI(unwrap(Val), unwrap(DestTy), Name));
3857 LLVMTypeRef DestTy, const char *Name) {
3858 return wrap(unwrap(B)->CreateFPToSI(unwrap(Val), unwrap(DestTy), Nam
[all...]
H A DVerifier.cpp3082 Type *DestTy = I.getType(); local
3086 unsigned DestBitSize = DestTy->getScalarSizeInBits();
3089 Check(DestTy->isIntOrIntVectorTy(), "Trunc only produces integer", &I);
3090 Check(SrcTy->isVectorTy() == DestTy->isVectorTy(),
3092 Check(SrcBitSize > DestBitSize, "DestTy too big for Trunc", &I);
3100 Type *DestTy = I.getType(); local
3104 Check(DestTy->isIntOrIntVectorTy(), "ZExt only produces an integer", &I);
3105 Check(SrcTy->isVectorTy() == DestTy->isVectorTy(),
3108 unsigned DestBitSize = DestTy->getScalarSizeInBits();
3118 Type *DestTy local
3136 Type *DestTy = I.getType(); local
3153 Type *DestTy = I.getType(); local
3171 Type *DestTy = I.getType(); local
3194 Type *DestTy = I.getType(); local
3217 Type *DestTy = I.getType(); local
3239 Type *DestTy = I.getType(); local
3261 Type *DestTy = I.getType(); local
3282 Type *DestTy = I.getType(); local
3307 Type *DestTy = I.getType(); local
[all...]
H A DInstructions.cpp3074 Type *DestTy,
3076 assert(castIsValid(Opcode, SrcTy, DestTy) && "method precondition");
3095 DestTy->getScalarSizeInBits();
3097 return DL.getIntPtrType(DestTy)->getScalarSizeInBits() ==
3198 // No-op cast in second op implies firstOp as long as the DestTy
3205 // No-op cast in second op implies firstOp as long as the DestTy
3553 bool CastInst::isBitCastable(Type *SrcTy, Type *DestTy) { argument
3554 if (!SrcTy->isFirstClassType() || !DestTy->isFirstClassType())
3557 if (SrcTy == DestTy)
3561 if (VectorType *DestVecTy = dyn_cast<VectorType>(DestTy)) {
3072 isNoopCast(Instruction::CastOps Opcode, Type *SrcTy, Type *DestTy, const DataLayout &DL) argument
3593 isBitOrNoopPointerCastable(Type *SrcTy, Type *DestTy, const DataLayout &DL) argument
3615 getCastOpcode( const Value *Src, bool SrcIsSigned, Type *DestTy, bool DestIsSigned) argument
[all...]
/freebsd-current/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/
H A DLegalizationArtifactCombiner.h414 const LLT DestTy = MRI.getType(MI.getOperand(0).getReg()); local
418 const unsigned DestSize = DestTy.getSizeInBits();
421 if (SrcTy.isVector() && SrcTy.getScalarType() == DestTy.getScalarType()) {
432 DestTy.isVector() ? CastSrcTy.getNumElements() / NumDefs : 1;
453 if (CastSrcTy.isScalar() && SrcTy.isScalar() && !DestTy.isVector()) {
466 {TargetOpcode::G_UNMERGE_VALUES, {DestTy, CastSrcTy}}))
477 DstRegs[Idx] = MRI.createGenericVirtualRegister(DestTy);
494 LLT OpTy, LLT DestTy) {
503 // to the destination type (DestTy).
525 return !DestTy
493 canFoldMergeOpcode(unsigned MergeOp, unsigned ConvertOp, LLT OpTy, LLT DestTy) argument
875 LLT DestTy = MRI.getType(MI.getReg(0)); local
1048 LLT DestTy = MRI.getType(MI.getReg(0)); local
[all...]
/freebsd-current/contrib/llvm-project/llvm/lib/Analysis/
H A DConstantFolding.cpp71 static Constant *foldConstVectorToAPInt(APInt &Result, Type *DestTy, argument
92 return ConstantExpr::getBitCast(C, DestTy);
104 Constant *FoldBitCast(Constant *C, Type *DestTy, const DataLayout &DL) { argument
105 assert(CastInst::castIsValid(Instruction::BitCast, C, DestTy) &&
109 if (Constant *Res = ConstantFoldLoadFromUniformValue(C, DestTy))
114 if (isa<IntegerType>(DestTy) || DestTy->isFloatingPointTy()) {
128 APInt Result(DL.getTypeSizeInBits(DestTy), 0);
129 if (Constant *CE = foldConstVectorToAPInt(Result, DestTy, C,
133 if (isa<IntegerType>(DestTy))
344 ConstantFoldLoadThroughBitcast(Constant *C, Type *DestTy, const DataLayout &DL) argument
995 Type *DestTy = InstOrCE->getType(); local
1383 ConstantFoldCastOperand(unsigned Opcode, Constant *C, Type *DestTy, const DataLayout &DL) argument
1470 ConstantFoldIntegerCast(Constant *C, Type *DestTy, bool IsSigned, const DataLayout &DL) argument
[all...]
/freebsd-current/contrib/llvm-project/llvm/lib/Transforms/IPO/
H A DMergeFunctions.cpp482 static Value *createCast(IRBuilder<> &Builder, Value *V, Type *DestTy) { argument
485 assert(DestTy->isStructTy());
486 assert(SrcTy->getStructNumElements() == DestTy->getStructNumElements());
487 Value *Result = PoisonValue::get(DestTy);
491 DestTy->getStructElementType(I));
497 assert(!DestTy->isStructTy());
498 if (SrcTy->isIntegerTy() && DestTy->isPointerTy())
499 return Builder.CreateIntToPtr(V, DestTy);
500 else if (SrcTy->isPointerTy() && DestTy->isIntegerTy())
501 return Builder.CreatePtrToInt(V, DestTy);
[all...]
/freebsd-current/contrib/llvm-project/llvm/lib/Target/NVPTX/
H A DNVPTXISelDAGToDAG.h102 static unsigned GetConvertOpcode(MVT DestTy, MVT SrcTy, LoadSDNode *N);
/freebsd-current/contrib/llvm-project/llvm/include/llvm-c/
H A DCore.h4203 LLVMTypeRef DestTy, const char *Name);
4205 LLVMTypeRef DestTy, const char *Name);
4207 LLVMTypeRef DestTy, const char *Name);
4209 LLVMTypeRef DestTy, const char *Name);
4211 LLVMTypeRef DestTy, const char *Name);
4213 LLVMTypeRef DestTy, const char *Name);
4215 LLVMTypeRef DestTy, const char *Name);
4217 LLVMTypeRef DestTy, const char *Name);
4219 LLVMTypeRef DestTy, const char *Name);
4221 LLVMTypeRef DestTy, cons
[all...]
/freebsd-current/contrib/llvm-project/llvm/lib/Target/Hexagon/
H A DHexagonLoopIdiomRecognition.cpp592 void promoteTo(Instruction *In, IntegerType *DestTy, BasicBlock *LoopB);
981 IntegerType *DestTy) {
983 if (!T || T->getBitWidth() > DestTy->getBitWidth())
985 if (T->getBitWidth() == DestTy->getBitWidth())
1019 IntegerType *DestTy, BasicBlock *LoopB) {
1025 In->mutateType(DestTy);
1026 unsigned DestBW = DestTy->getBitWidth();
1042 InV = IRBuilder<>(InB->getTerminator()).CreateZExt(InV, DestTy);
1055 Value *Mask = ConstantInt::get(DestTy, (1u << TruncTy->getBitWidth()) - 1);
1066 In->setOperand(i, ConstantInt::get(DestTy, C
980 isPromotableTo(Value *Val, IntegerType *DestTy) argument
1018 promoteTo(Instruction *In, IntegerType *DestTy, BasicBlock *LoopB) argument
[all...]

Completed in 413 milliseconds

123