Home
last modified time | relevance | path

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

1234

/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineCasts.cpp219 auto *DestTy = dyn_cast<FixedVectorType>(Ty); in commonCastTransforms() local
220 if (SrcTy && DestTy && in commonCastTransforms()
221 SrcTy->getNumElements() == DestTy->getNumElements() && in commonCastTransforms()
222 SrcTy->getPrimitiveSizeInBits() == DestTy->getPrimitiveSizeInBits()) { in commonCastTransforms()
223 Value *CastX = Builder.CreateCast(CI.getOpcode(), X, DestTy); in commonCastTransforms()
523 Type *DestTy = Trunc.getType(); in narrowFunnelShift() local
524 unsigned NarrowWidth = DestTy->getScalarSizeInBits(); in narrowFunnelShift()
606 Value *NarrowShAmt = Builder.CreateZExtOrTrunc(ShAmt, DestTy); in narrowFunnelShift()
609 X = Y = Builder.CreateTrunc(ShVal0, DestTy); in narrowFunnelShift()
611 Y = Builder.CreateTrunc(ShVal1, DestTy); in narrowFunnelShift()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/IR/
H A DConstantFold.cpp69 static Constant *FoldBitCast(Constant *V, Type *DestTy) { in FoldBitCast() argument
71 if (SrcTy == DestTy) in FoldBitCast()
75 return Constant::getAllOnesValue(DestTy); in FoldBitCast()
82 if (isa<VectorType>(DestTy) && !isa<VectorType>(SrcTy)) in FoldBitCast()
83 return ConstantExpr::getBitCast(ConstantVector::get(V), DestTy); in FoldBitCast()
87 if (!DestTy->isFPOrFPVectorTy() || DestTy->isPPC_FP128Ty() || in FoldBitCast()
88 DestTy->getScalarSizeInBits() != SrcTy->getScalarSizeInBits()) in FoldBitCast()
92 DestTy, in FoldBitCast()
93 APFloat(DestTy->getScalarType()->getFltSemantics(), CI->getValue())); in FoldBitCast()
101 if (isa<VectorType>(DestTy) && !isa<VectorType>(SrcTy)) in FoldBitCast()
[all …]
H A DCore.cpp4147 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildTrunc() argument
4148 return wrap(unwrap(B)->CreateTrunc(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildTrunc()
4152 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildZExt() argument
4153 return wrap(unwrap(B)->CreateZExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildZExt()
4157 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildSExt() argument
4158 return wrap(unwrap(B)->CreateSExt(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildSExt()
4162 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildFPToUI() argument
4163 return wrap(unwrap(B)->CreateFPToUI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToUI()
4167 LLVMTypeRef DestTy, const char *Name) { in LLVMBuildFPToSI() argument
4168 return wrap(unwrap(B)->CreateFPToSI(unwrap(Val), unwrap(DestTy), Name)); in LLVMBuildFPToSI()
[all …]
H A DIRBuilder.cpp71 Value *IRBuilderBase::CreateAggregateCast(Value *V, Type *DestTy) { in CreateAggregateCast() argument
73 if (SrcTy == DestTy) in CreateAggregateCast()
79 assert(DestTy->isStructTy() && "Expected StructType"); in CreateAggregateCast()
80 assert(SrcTy->getStructNumElements() == DestTy->getStructNumElements() && in CreateAggregateCast()
84 assert(SrcTy->isArrayTy() && DestTy->isArrayTy() && "Expected ArrayType"); in CreateAggregateCast()
85 assert(SrcTy->getArrayNumElements() == DestTy->getArrayNumElements() && in CreateAggregateCast()
90 Value *Result = PoisonValue::get(DestTy); in CreateAggregateCast()
92 Type *ElementTy = SrcTy->isStructTy() ? DestTy->getStructElementType(I) in CreateAggregateCast()
93 : DestTy->getArrayElementType(); in CreateAggregateCast()
102 return CreateBitOrPointerCast(V, DestTy); in CreateAggregateCast()
[all …]
H A DVerifier.cpp3352 Type *DestTy = I.getType(); in visitTruncInst() local
3356 unsigned DestBitSize = DestTy->getScalarSizeInBits(); in visitTruncInst()
3359 Check(DestTy->isIntOrIntVectorTy(), "Trunc only produces integer", &I); in visitTruncInst()
3360 Check(SrcTy->isVectorTy() == DestTy->isVectorTy(), in visitTruncInst()
3370 Type *DestTy = I.getType(); in visitZExtInst() local
3374 Check(DestTy->isIntOrIntVectorTy(), "ZExt only produces an integer", &I); in visitZExtInst()
3375 Check(SrcTy->isVectorTy() == DestTy->isVectorTy(), in visitZExtInst()
3378 unsigned DestBitSize = DestTy->getScalarSizeInBits(); in visitZExtInst()
3388 Type *DestTy = I.getType(); in visitSExtInst() local
3392 unsigned DestBitSize = DestTy->getScalarSizeInBits(); in visitSExtInst()
[all …]
H A DInstructions.cpp2782 Type *DestTy, in isNoopCast() argument
2784 assert(castIsValid(Opcode, SrcTy, DestTy) && "method precondition"); in isNoopCast()
2803 DestTy->getScalarSizeInBits(); in isNoopCast()
2805 return DL.getIntPtrType(DestTy)->getScalarSizeInBits() == in isNoopCast()
3148 bool CastInst::isBitCastable(Type *SrcTy, Type *DestTy) { in isBitCastable() argument
3149 if (!SrcTy->isFirstClassType() || !DestTy->isFirstClassType()) in isBitCastable()
3152 if (SrcTy == DestTy) in isBitCastable()
3156 if (VectorType *DestVecTy = dyn_cast<VectorType>(DestTy)) { in isBitCastable()
3160 DestTy = DestVecTy->getElementType(); in isBitCastable()
3165 if (PointerType *DestPtrTy = dyn_cast<PointerType>(DestTy)) { in isBitCastable()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DInstSimplifyFolder.h118 Type *DestTy) const override { in FoldCast() argument
119 return simplifyCastInst(Op, V, DestTy, SQ); in FoldCast()
132 Value *CreatePointerCast(Constant *C, Type *DestTy) const override { in CreatePointerCast() argument
133 if (C->getType() == DestTy) in CreatePointerCast()
135 return ConstFolder.CreatePointerCast(C, DestTy); in CreatePointerCast()
139 Type *DestTy) const override { in CreatePointerBitCastOrAddrSpaceCast() argument
140 if (C->getType() == DestTy) in CreatePointerBitCastOrAddrSpaceCast()
142 return ConstFolder.CreatePointerBitCastOrAddrSpaceCast(C, DestTy); in CreatePointerBitCastOrAddrSpaceCast()
H A DTargetFolder.h186 Type *DestTy) const override { in FoldCast() argument
188 return ConstantFoldCastOperand(Op, C, DestTy, DL); in FoldCast()
205 Constant *CreatePointerCast(Constant *C, Type *DestTy) const override { in CreatePointerCast() argument
206 if (C->getType() == DestTy) in CreatePointerCast()
208 return Fold(ConstantExpr::getPointerCast(C, DestTy)); in CreatePointerCast()
212 Type *DestTy) const override { in CreatePointerBitCastOrAddrSpaceCast() argument
213 if (C->getType() == DestTy) in CreatePointerBitCastOrAddrSpaceCast()
215 return Fold(ConstantExpr::getPointerBitCastOrAddrSpaceCast(C, DestTy)); in CreatePointerBitCastOrAddrSpaceCast()
H A DConstantFolding.h131 Type *DestTy, const DataLayout &DL);
135 LLVM_ABI Constant *ConstantFoldIntegerCast(Constant *C, Type *DestTy,
219 LLVM_ABI Constant *ConstantFoldLoadThroughBitcast(Constant *C, Type *DestTy,
/freebsd/contrib/llvm-project/llvm/include/llvm/IR/
H A DIRBuilder.h2073 Value *CreateTrunc(Value *V, Type *DestTy, const Twine &Name = "",
2075 if (V->getType() == DestTy)
2077 if (Value *Folded = Folder.FoldCast(Instruction::Trunc, V, DestTy))
2079 Instruction *I = CastInst::Create(Instruction::Trunc, V, DestTy);
2087 Value *CreateZExt(Value *V, Type *DestTy, const Twine &Name = "",
2089 if (V->getType() == DestTy)
2091 if (Value *Folded = Folder.FoldCast(Instruction::ZExt, V, DestTy))
2093 Instruction *I = Insert(new ZExtInst(V, DestTy), Name);
2099 Value *CreateSExt(Value *V, Type *DestTy, const Twine &Name = "") {
2100 return CreateCast(Instruction::SExt, V, DestTy, Name);
[all …]
H A DNoFolder.h112 Type *DestTy) const override { in FoldCast() argument
125 Instruction *CreatePointerCast(Constant *C, Type *DestTy) const override { in CreatePointerCast() argument
126 return CastInst::CreatePointerCast(C, DestTy); in CreatePointerCast()
130 Constant *C, Type *DestTy) const override { in CreatePointerBitCastOrAddrSpaceCast() argument
131 return CastInst::CreatePointerBitCastOrAddrSpaceCast(C, DestTy); in CreatePointerBitCastOrAddrSpaceCast()
H A DConstantFolder.h175 Type *DestTy) const override { in FoldCast() argument
178 return ConstantExpr::getCast(Op, C, DestTy); in FoldCast()
179 return ConstantFoldCastInstruction(Op, C, DestTy); in FoldCast()
194 Constant *CreatePointerCast(Constant *C, Type *DestTy) const override { in CreatePointerCast() argument
195 return ConstantExpr::getPointerCast(C, DestTy); in CreatePointerCast()
199 Type *DestTy) const override { in CreatePointerBitCastOrAddrSpaceCast() argument
200 return ConstantExpr::getPointerBitCastOrAddrSpaceCast(C, DestTy); in CreatePointerBitCastOrAddrSpaceCast()
H A DIRBuilderFolder.h76 Type *DestTy) const = 0;
86 virtual Value *CreatePointerCast(Constant *C, Type *DestTy) const = 0;
88 Type *DestTy) const = 0;
H A DAutoUpgrade.h86 LLVM_ABI Instruction *UpgradeBitCastInst(unsigned Opc, Value *V, Type *DestTy,
93 Type *DestTy);
/freebsd/contrib/llvm-project/llvm/tools/llvm-stress/
H A Dllvm-stress.cpp532 Type *DestTy = pickScalarType(); in Act() local
536 DestTy = pickVectorType(cast<VectorType>(VTy)); in Act()
539 if (VTy == DestTy) return; in Act()
543 if (!DestTy->isPointerTy()) in Act()
544 DestTy = PointerType::get(Context, 0); in Act()
546 new BitCastInst(V, DestTy, "PC", BB->getTerminator()->getIterator())); in Act()
550 unsigned DestSize = DestTy->getScalarType()->getPrimitiveSizeInBits(); in Act()
555 new BitCastInst(V, DestTy, "BC", BB->getTerminator()->getIterator())); in Act()
559 if (VTy->isIntOrIntVectorTy() && DestTy->isIntOrIntVectorTy()) { in Act()
562 new TruncInst(V, DestTy, "Tr", BB->getTerminator()->getIterator())); in Act()
[all …]
/freebsd/contrib/llvm-project/llvm/utils/TableGen/
H A DCallingConvEmitter.cpp282 const Record *DestTy = Action->getValueAsDef("DestTy"); in emitAction() local
283 MVT::SimpleValueType DestVT = getValueType(DestTy); in emitAction()
296 const Record *DestTy = Action->getValueAsDef("DestTy"); in emitAction() local
297 MVT::SimpleValueType DestVT = getValueType(DestTy); in emitAction()
312 const Record *DestTy = Action->getValueAsDef("DestTy"); in emitAction() local
313 O << Indent << "LocVT = " << getEnumName(getValueType(DestTy)) << ";\n"; in emitAction()
316 const Record *DestTy = Action->getValueAsDef("DestTy"); in emitAction() local
317 O << Indent << "LocVT = " << getEnumName(getValueType(DestTy)) << ";\n"; in emitAction()
320 const Record *DestTy = Action->getValueAsDef("DestTy"); in emitAction() local
321 O << Indent << "LocVT = " << getEnumName(getValueType(DestTy)) << ";\n"; in emitAction()
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/
H A DLegalizationArtifactCombiner.h433 const LLT DestTy = MRI.getType(MI.getOperand(0).getReg()); in tryFoldUnmergeCast() local
437 const unsigned DestSize = DestTy.getSizeInBits(); in tryFoldUnmergeCast()
440 if (SrcTy.isVector() && SrcTy.getScalarType() == DestTy.getScalarType()) { in tryFoldUnmergeCast()
451 DestTy.isVector() ? CastSrcTy.getNumElements() / NumDefs : 1; in tryFoldUnmergeCast()
476 if (CastSrcTy.isScalar() && SrcTy.isScalar() && !DestTy.isVector()) { in tryFoldUnmergeCast()
489 {TargetOpcode::G_UNMERGE_VALUES, {DestTy, CastSrcTy}})) in tryFoldUnmergeCast()
500 DstRegs[Idx] = MRI.createGenericVirtualRegister(DestTy); in tryFoldUnmergeCast()
517 LLT OpTy, LLT DestTy) { in canFoldMergeOpcode() argument
548 return !DestTy.isVector() && OpTy.isVector() && in canFoldMergeOpcode()
549 DestTy == OpTy.getElementType(); in canFoldMergeOpcode()
[all …]
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DTargetInfo.cpp146 llvm::Type *DestTy, bool isNonNull) const { in performAddrSpaceCast() argument
150 return performAddrSpaceCast(CGF.CGM, C, SrcAddr, DestTy); in performAddrSpaceCast()
153 Src, DestTy, Src->hasName() ? Src->getName() + ".ascast" : ""); in performAddrSpaceCast()
159 llvm::Type *DestTy) const { in performAddrSpaceCast()
162 return llvm::ConstantExpr::getPointerCast(Src, DestTy); in performAddrSpaceCast()
H A DCGExprScalar.cpp2408 QualType DestTy = CE->getType(); in VisitCastExpr() local
2427 Addr = Addr.withElementType(CGF.ConvertTypeForMem(DestTy)); in VisitCastExpr()
2428 LValue LV = CGF.MakeAddrLValue(Addr, DestTy); in VisitCastExpr()
2435 SourceLVal.getAddress().withElementType(CGF.ConvertTypeForMem(DestTy)); in VisitCastExpr()
2436 LValue DestLV = CGF.MakeAddrLValue(Addr, DestTy); in VisitCastExpr()
2447 llvm::Type *DstTy = ConvertType(DestTy); in VisitCastExpr()
2468 if (auto *PT = DestTy->getAs<PointerType>()) { in VisitCastExpr()
2483 if (SrcType.mayBeNotDynamicClass() && DestTy.mayBeDynamicClass()) { in VisitCastExpr()
2487 } else if (SrcType.mayBeDynamicClass() && DestTy.mayBeNotDynamicClass()) { in VisitCastExpr()
2502 QualType PointeeType = DestTy->getPointeeType(); in VisitCastExpr()
[all …]
H A DTargetInfo.h323 LangAS SrcAddr, llvm::Type *DestTy,
334 llvm::Type *DestTy,
345 llvm::Type *DestTy) const;
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DConstantFolding.cpp78 static Constant *foldConstVectorToAPInt(APInt &Result, Type *DestTy, in foldConstVectorToAPInt() argument
99 return ConstantExpr::getBitCast(C, DestTy); in foldConstVectorToAPInt()
111 Constant *FoldBitCast(Constant *C, Type *DestTy, const DataLayout &DL) { in FoldBitCast() argument
112 assert(CastInst::castIsValid(Instruction::BitCast, C, DestTy) && in FoldBitCast()
116 if (Constant *Res = ConstantFoldLoadFromUniformValue(C, DestTy, DL)) in FoldBitCast()
121 if (isa<IntegerType>(DestTy) || DestTy->isFloatingPointTy()) { in FoldBitCast()
135 APInt Result(DL.getTypeSizeInBits(DestTy), 0); in FoldBitCast()
136 if (Constant *CE = foldConstVectorToAPInt(Result, DestTy, C, in FoldBitCast()
140 if (isa<IntegerType>(DestTy)) in FoldBitCast()
141 return ConstantInt::get(DestTy, Result); in FoldBitCast()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm-c/
H A DCore.h4741 LLVMTypeRef DestTy, const char *Name);
4743 LLVMTypeRef DestTy, const char *Name);
4745 LLVMTypeRef DestTy, const char *Name);
4747 LLVMTypeRef DestTy, const char *Name);
4749 LLVMTypeRef DestTy, const char *Name);
4751 LLVMTypeRef DestTy, const char *Name);
4753 LLVMTypeRef DestTy, const char *Name);
4755 LLVMTypeRef DestTy, const char *Name);
4757 LLVMTypeRef DestTy, const char *Name);
4759 LLVMTypeRef DestTy, const char *Name);
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Target/
H A DTargetCallingConv.td171 ValueType DestTy = destTy;
177 ValueType DestTy = destTy;
183 ValueType DestTy = destTy;
189 ValueType DestTy = destTy;
195 ValueType DestTy = destTy;
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPUCombinerHelper.cpp464 LLT DestTy = MRI.getType(Dst); in matchCombineFmulWithSelectToFldexp() local
465 LLT ScalarDestTy = DestTy.getScalarType(); in matchCombineFmulWithSelectToFldexp()
501 LLT IntDestTy = DestTy.changeElementType(LLT::scalar(32)); in matchCombineFmulWithSelectToFldexp()
510 Builder.buildFNeg(DestTy, XReg, MRI.getVRegDef(XReg)->getFlags()); in matchCombineFmulWithSelectToFldexp()
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/
H A DHexagonLoopIdiomRecognition.cpp582 void promoteTo(Instruction *In, IntegerType *DestTy, BasicBlock *LoopB);
965 IntegerType *DestTy) { in isPromotableTo() argument
967 if (!T || T->getBitWidth() > DestTy->getBitWidth()) in isPromotableTo()
969 if (T->getBitWidth() == DestTy->getBitWidth()) in isPromotableTo()
1003 IntegerType *DestTy, BasicBlock *LoopB) { in promoteTo() argument
1009 In->mutateType(DestTy); in promoteTo()
1010 unsigned DestBW = DestTy->getBitWidth(); in promoteTo()
1026 InV = IRBuilder<>(InB->getTerminator()).CreateZExt(InV, DestTy); in promoteTo()
1039 Value *Mask = ConstantInt::get(DestTy, (1u << TruncTy->getBitWidth()) - 1); in promoteTo()
1050 In->setOperand(i, ConstantInt::get(DestTy, CI->getZExtValue())); in promoteTo()
[all …]

1234