Lines Matching +full:function +full:- +full:mask
1 //===- IRBuilder.cpp - Builder for LLVM Instrs ----------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
20 #include "llvm/IR/Function.h"
40 /// CreateGlobalString - Make a new global variable with an initializer that
50 M = BB->getParent()->getParent(); in CreateGlobalString()
52 *M, StrConstant->getType(), true, GlobalValue::PrivateLinkage, in CreateGlobalString()
54 GV->setUnnamedAddr(GlobalValue::UnnamedAddr::Global); in CreateGlobalString()
55 GV->setAlignment(Align(1)); in CreateGlobalString()
60 assert(BB && BB->getParent() && "No current function!"); in getCurrentFunctionReturnType()
61 return BB->getParent()->getReturnType(); in getCurrentFunctionReturnType()
74 I->setDebugLoc(DebugLoc(KV.second)); in SetInstDebugLocation()
80 IRBuilderBase::createCallHelper(Function *Callee, ArrayRef<Value *> Ops, in createCallHelper()
85 CI->copyFastMathFlags(FMFSource); in createCallHelper()
91 if (cast<ConstantInt>(Scaling)->isZero()) in CreateVScale()
93 Module *M = GetInsertBlock()->getParent()->getParent(); in CreateVScale()
94 Function *TheFn = in CreateVScale()
95 Intrinsic::getDeclaration(M, Intrinsic::vscale, {Scaling->getType()}); in CreateVScale()
97 return cast<ConstantInt>(Scaling)->isOne() ? CI : CreateMul(CI, Scaling); in CreateVScale()
111 Type *STy = DstType->getScalarType(); in CreateStepVector()
115 // temporary - once the intrinsic properly supports < 8 bits this code in CreateStepVector()
117 if (STy->getScalarSizeInBits() < 8) in CreateStepVector()
127 unsigned NumEls = cast<FixedVectorType>(DstType)->getNumElements(); in CreateStepVector()
143 Type *Tys[] = { Ptr->getType(), Size->getType() }; in CreateMemSet()
144 Module *M = BB->getParent()->getParent(); in CreateMemSet()
145 Function *TheFn = Intrinsic::getDeclaration(M, Intrinsic::memset, Tys); in CreateMemSet()
150 cast<MemSetInst>(CI)->setDestAlignment(*Align); in CreateMemSet()
154 CI->setMetadata(LLVMContext::MD_tbaa, TBAATag); in CreateMemSet()
157 CI->setMetadata(LLVMContext::MD_alias_scope, ScopeTag); in CreateMemSet()
160 CI->setMetadata(LLVMContext::MD_noalias, NoAliasTag); in CreateMemSet()
171 Type *Tys[] = {Dst->getType(), Size->getType()}; in CreateMemSetInline()
172 Module *M = BB->getParent()->getParent(); in CreateMemSetInline()
173 Function *TheFn = Intrinsic::getDeclaration(M, Intrinsic::memset_inline, Tys); in CreateMemSetInline()
178 cast<MemSetInlineInst>(CI)->setDestAlignment(*DstAlign); in CreateMemSetInline()
182 CI->setMetadata(LLVMContext::MD_tbaa, TBAATag); in CreateMemSetInline()
185 CI->setMetadata(LLVMContext::MD_alias_scope, ScopeTag); in CreateMemSetInline()
188 CI->setMetadata(LLVMContext::MD_noalias, NoAliasTag); in CreateMemSetInline()
198 Type *Tys[] = {Ptr->getType(), Size->getType()}; in CreateElementUnorderedAtomicMemSet()
199 Module *M = BB->getParent()->getParent(); in CreateElementUnorderedAtomicMemSet()
200 Function *TheFn = Intrinsic::getDeclaration( in CreateElementUnorderedAtomicMemSet()
205 cast<AtomicMemSetInst>(CI)->setDestAlignment(Alignment); in CreateElementUnorderedAtomicMemSet()
209 CI->setMetadata(LLVMContext::MD_tbaa, TBAATag); in CreateElementUnorderedAtomicMemSet()
212 CI->setMetadata(LLVMContext::MD_alias_scope, ScopeTag); in CreateElementUnorderedAtomicMemSet()
215 CI->setMetadata(LLVMContext::MD_noalias, NoAliasTag); in CreateElementUnorderedAtomicMemSet()
228 Type *Tys[] = { Dst->getType(), Src->getType(), Size->getType() }; in CreateMemTransferInst()
229 Module *M = BB->getParent()->getParent(); in CreateMemTransferInst()
230 Function *TheFn = Intrinsic::getDeclaration(M, IntrID, Tys); in CreateMemTransferInst()
236 MCI->setDestAlignment(*DstAlign); in CreateMemTransferInst()
238 MCI->setSourceAlignment(*SrcAlign); in CreateMemTransferInst()
242 CI->setMetadata(LLVMContext::MD_tbaa, TBAATag); in CreateMemTransferInst()
246 CI->setMetadata(LLVMContext::MD_tbaa_struct, TBAAStructTag); in CreateMemTransferInst()
249 CI->setMetadata(LLVMContext::MD_alias_scope, ScopeTag); in CreateMemTransferInst()
252 CI->setMetadata(LLVMContext::MD_noalias, NoAliasTag); in CreateMemTransferInst()
266 Type *Tys[] = {Dst->getType(), Src->getType(), Size->getType()}; in CreateElementUnorderedAtomicMemCpy()
267 Module *M = BB->getParent()->getParent(); in CreateElementUnorderedAtomicMemCpy()
268 Function *TheFn = Intrinsic::getDeclaration( in CreateElementUnorderedAtomicMemCpy()
275 AMCI->setDestAlignment(DstAlign); in CreateElementUnorderedAtomicMemCpy()
276 AMCI->setSourceAlignment(SrcAlign); in CreateElementUnorderedAtomicMemCpy()
280 CI->setMetadata(LLVMContext::MD_tbaa, TBAATag); in CreateElementUnorderedAtomicMemCpy()
284 CI->setMetadata(LLVMContext::MD_tbaa_struct, TBAAStructTag); in CreateElementUnorderedAtomicMemCpy()
287 CI->setMetadata(LLVMContext::MD_alias_scope, ScopeTag); in CreateElementUnorderedAtomicMemCpy()
290 CI->setMetadata(LLVMContext::MD_noalias, NoAliasTag); in CreateElementUnorderedAtomicMemCpy()
295 /// isConstantOne - Return true only if val is constant int 1
299 return CVal && CVal->isOne(); in isConstantOne()
305 Function *MallocF, const Twine &Name) { in CreateMalloc()
312 else if (ArraySize->getType() != IntPtrTy) in CreateMalloc()
324 assert(AllocSize->getType() == IntPtrTy && "malloc arg is wrong size"); in CreateMalloc()
326 Module *M = BB->getParent()->getParent(); in CreateMalloc()
331 MallocFunc = M->getOrInsertFunction("malloc", BPTy, IntPtrTy); in CreateMalloc()
334 MCall->setTailCall(); in CreateMalloc()
335 if (Function *F = dyn_cast<Function>(MallocFunc.getCallee())) { in CreateMalloc()
336 MCall->setCallingConv(F->getCallingConv()); in CreateMalloc()
337 F->setReturnDoesNotAlias(); in CreateMalloc()
340 assert(!MCall->getType()->isVoidTy() && "Malloc has void return type"); in CreateMalloc()
347 Function *MallocF, const Twine &Name) { in CreateMalloc()
353 /// CreateFree - Generate the IR for a call to the builtin free function.
356 assert(Source->getType()->isPointerTy() && in CreateFree()
359 Module *M = BB->getParent()->getParent(); in CreateFree()
361 Type *VoidTy = Type::getVoidTy(M->getContext()); in CreateFree()
362 Type *VoidPtrTy = PointerType::getUnqual(M->getContext()); in CreateFree()
364 FunctionCallee FreeFunc = M->getOrInsertFunction("free", VoidTy, VoidPtrTy); in CreateFree()
366 Result->setTailCall(); in CreateFree()
367 if (Function *F = dyn_cast<Function>(FreeFunc.getCallee())) in CreateFree()
368 Result->setCallingConv(F->getCallingConv()); in CreateFree()
382 Type *Tys[] = {Dst->getType(), Src->getType(), Size->getType()}; in CreateElementUnorderedAtomicMemMove()
383 Module *M = BB->getParent()->getParent(); in CreateElementUnorderedAtomicMemMove()
384 Function *TheFn = Intrinsic::getDeclaration( in CreateElementUnorderedAtomicMemMove()
390 CI->addParamAttr(0, Attribute::getWithAlignment(CI->getContext(), DstAlign)); in CreateElementUnorderedAtomicMemMove()
391 CI->addParamAttr(1, Attribute::getWithAlignment(CI->getContext(), SrcAlign)); in CreateElementUnorderedAtomicMemMove()
395 CI->setMetadata(LLVMContext::MD_tbaa, TBAATag); in CreateElementUnorderedAtomicMemMove()
399 CI->setMetadata(LLVMContext::MD_tbaa_struct, TBAAStructTag); in CreateElementUnorderedAtomicMemMove()
402 CI->setMetadata(LLVMContext::MD_alias_scope, ScopeTag); in CreateElementUnorderedAtomicMemMove()
405 CI->setMetadata(LLVMContext::MD_noalias, NoAliasTag); in CreateElementUnorderedAtomicMemMove()
411 Module *M = GetInsertBlock()->getParent()->getParent(); in getReductionIntrinsic()
413 Type *Tys[] = { Src->getType() }; in getReductionIntrinsic()
419 Module *M = GetInsertBlock()->getParent()->getParent(); in CreateFAddReduce()
422 {Src->getType()}); in CreateFAddReduce()
427 Module *M = GetInsertBlock()->getParent()->getParent(); in CreateFMulReduce()
430 {Src->getType()}); in CreateFMulReduce()
483 assert(isa<PointerType>(Ptr->getType()) && in CreateLifetimeStart()
486 Size = getInt64(-1); in CreateLifetimeStart()
488 assert(Size->getType() == getInt64Ty() && in CreateLifetimeStart()
491 Module *M = BB->getParent()->getParent(); in CreateLifetimeStart()
492 Function *TheFn = in CreateLifetimeStart()
493 Intrinsic::getDeclaration(M, Intrinsic::lifetime_start, {Ptr->getType()}); in CreateLifetimeStart()
498 assert(isa<PointerType>(Ptr->getType()) && in CreateLifetimeEnd()
501 Size = getInt64(-1); in CreateLifetimeEnd()
503 assert(Size->getType() == getInt64Ty() && in CreateLifetimeEnd()
506 Module *M = BB->getParent()->getParent(); in CreateLifetimeEnd()
507 Function *TheFn = in CreateLifetimeEnd()
508 Intrinsic::getDeclaration(M, Intrinsic::lifetime_end, {Ptr->getType()}); in CreateLifetimeEnd()
514 assert(isa<PointerType>(Ptr->getType()) && in CreateInvariantStart()
517 Size = getInt64(-1); in CreateInvariantStart()
519 assert(Size->getType() == getInt64Ty() && in CreateInvariantStart()
524 Type *ObjectPtr[1] = {Ptr->getType()}; in CreateInvariantStart()
525 Module *M = BB->getParent()->getParent(); in CreateInvariantStart()
526 Function *TheFn = in CreateInvariantStart()
533 return O->getAlign(); in getAlign()
535 return A->getAliaseeObject()->getAlign(); in getAlign()
540 assert(isa<GlobalValue>(Ptr) && cast<GlobalValue>(Ptr)->isThreadLocal() && in CreateThreadLocalAddress()
543 {Ptr->getType()}, {Ptr}); in CreateThreadLocalAddress()
545 CI->addParamAttr(0, Attribute::getWithAlignment(CI->getContext(), *A)); in CreateThreadLocalAddress()
546 CI->addRetAttr(Attribute::getWithAlignment(CI->getContext(), *A)); in CreateThreadLocalAddress()
554 assert(Cond->getType() == getInt1Ty() && in CreateAssumption()
558 Module *M = BB->getParent()->getParent(); in CreateAssumption()
559 Function *FnAssume = Intrinsic::getDeclaration(M, Intrinsic::assume); in CreateAssumption()
564 Module *M = BB->getModule(); in CreateNoAliasScopeDeclaration()
571 /// \p Ty - vector type to load
572 /// \p Ptr - base pointer for the load
573 /// \p Alignment - alignment of the source location
574 /// \p Mask - vector of booleans which indicates what vector lanes should
576 /// \p PassThru - pass-through value that is used to fill the masked-off lanes
578 /// \p Name - name of the result variable
580 Value *Mask, Value *PassThru, in CreateMaskedLoad() argument
582 auto *PtrTy = cast<PointerType>(Ptr->getType()); in CreateMaskedLoad()
583 assert(Ty->isVectorTy() && "Type should be vector"); in CreateMaskedLoad()
584 assert(Mask && "Mask should not be all-ones (null)"); in CreateMaskedLoad()
588 Value *Ops[] = {Ptr, getInt32(Alignment.value()), Mask, PassThru}; in CreateMaskedLoad()
594 /// \p Val - data to be stored,
595 /// \p Ptr - base pointer for the store
596 /// \p Alignment - alignment of the destination location
597 /// \p Mask - vector of booleans which indicates what vector lanes should
600 Align Alignment, Value *Mask) { in CreateMaskedStore() argument
601 auto *PtrTy = cast<PointerType>(Ptr->getType()); in CreateMaskedStore()
602 Type *DataTy = Val->getType(); in CreateMaskedStore()
603 assert(DataTy->isVectorTy() && "Val should be a vector"); in CreateMaskedStore()
604 assert(Mask && "Mask should not be all-ones (null)"); in CreateMaskedStore()
606 Value *Ops[] = {Val, Ptr, getInt32(Alignment.value()), Mask}; in CreateMaskedStore()
611 /// an array of operands - Ops, and an array of overloaded types -
617 Module *M = BB->getParent()->getParent(); in CreateMaskedIntrinsic()
618 Function *TheFn = Intrinsic::getDeclaration(M, Id, OverloadedTypes); in CreateMaskedIntrinsic()
623 /// \p Ty - vector type to gather
624 /// \p Ptrs - vector of pointers for loading
625 /// \p Align - alignment for one element
626 /// \p Mask - vector of booleans which indicates what vector lanes should
628 /// \p PassThru - pass-through value that is used to fill the masked-off lanes
630 /// \p Name - name of the result variable
632 Align Alignment, Value *Mask, in CreateMaskedGather() argument
636 ElementCount NumElts = VecTy->getElementCount(); in CreateMaskedGather()
637 auto *PtrsTy = cast<VectorType>(Ptrs->getType()); in CreateMaskedGather()
638 assert(NumElts == PtrsTy->getElementCount() && "Element count mismatch"); in CreateMaskedGather()
640 if (!Mask) in CreateMaskedGather()
641 Mask = getAllOnesMask(NumElts); in CreateMaskedGather()
647 Value *Ops[] = {Ptrs, getInt32(Alignment.value()), Mask, PassThru}; in CreateMaskedGather()
656 /// \p Data - data to be stored,
657 /// \p Ptrs - the vector of pointers, where the \p Data elements should be
659 /// \p Align - alignment for one element
660 /// \p Mask - vector of booleans which indicates what vector lanes should
663 Align Alignment, Value *Mask) { in CreateMaskedScatter() argument
664 auto *PtrsTy = cast<VectorType>(Ptrs->getType()); in CreateMaskedScatter()
665 auto *DataTy = cast<VectorType>(Data->getType()); in CreateMaskedScatter()
666 ElementCount NumElts = PtrsTy->getElementCount(); in CreateMaskedScatter()
668 if (!Mask) in CreateMaskedScatter()
669 Mask = getAllOnesMask(NumElts); in CreateMaskedScatter()
672 Value *Ops[] = {Data, Ptrs, getInt32(Alignment.value()), Mask}; in CreateMaskedScatter()
680 /// \p Ty - vector type to load
681 /// \p Ptr - base pointer for the load
682 /// \p Mask - vector of booleans which indicates what vector lanes should
684 /// \p PassThru - pass-through value that is used to fill the masked-off lanes
686 /// \p Name - name of the result variable
688 Value *Mask, Value *PassThru, in CreateMaskedExpandLoad() argument
690 assert(Ty->isVectorTy() && "Type should be vector"); in CreateMaskedExpandLoad()
691 assert(Mask && "Mask should not be all-ones (null)"); in CreateMaskedExpandLoad()
695 Value *Ops[] = {Ptr, Mask, PassThru}; in CreateMaskedExpandLoad()
701 /// \p Val - data to be stored,
702 /// \p Ptr - base pointer for the store
703 /// \p Mask - vector of booleans which indicates what vector lanes should
706 Value *Mask) { in CreateMaskedCompressStore() argument
707 Type *DataTy = Val->getType(); in CreateMaskedCompressStore()
708 assert(DataTy->isVectorTy() && "Val should be a vector"); in CreateMaskedCompressStore()
709 assert(Mask && "Mask should not be all-ones (null)"); in CreateMaskedCompressStore()
711 Value *Ops[] = {Val, Ptr, Mask}; in CreateMaskedCompressStore()
731 // GC args are now encoded in the gc-live operand bundle in getStatepointArgs()
749 Rval.emplace_back("gc-transition", TransitionValues); in getStatepointBundles()
754 Rval.emplace_back("gc-live", LiveValues); in getStatepointBundles()
766 Module *M = Builder->GetInsertBlock()->getParent()->getParent(); in CreateGCStatepointCallCommon()
767 // Fill in the one generic type'd argument (the function is also vararg) in CreateGCStatepointCallCommon()
768 Function *FnStatepoint = in CreateGCStatepointCallCommon()
770 {ActualCallee.getCallee()->getType()}); in CreateGCStatepointCallCommon()
775 CallInst *CI = Builder->CreateCall( in CreateGCStatepointCallCommon()
778 CI->addParamAttr(2, in CreateGCStatepointCallCommon()
779 Attribute::get(Builder->getContext(), Attribute::ElementType, in CreateGCStatepointCallCommon()
821 Module *M = Builder->GetInsertBlock()->getParent()->getParent(); in CreateGCStatepointInvokeCommon()
822 // Fill in the one generic type'd argument (the function is also vararg) in CreateGCStatepointInvokeCommon()
823 Function *FnStatepoint = in CreateGCStatepointInvokeCommon()
825 {ActualInvokee.getCallee()->getType()}); in CreateGCStatepointInvokeCommon()
831 InvokeInst *II = Builder->CreateInvoke( in CreateGCStatepointInvokeCommon()
834 II->addParamAttr(2, in CreateGCStatepointInvokeCommon()
835 Attribute::get(Builder->getContext(), Attribute::ElementType, in CreateGCStatepointInvokeCommon()
876 Module *M = BB->getParent()->getParent(); in CreateGCResult()
878 Function *FnGCResult = Intrinsic::getDeclaration(M, ID, Types); in CreateGCResult()
887 Module *M = BB->getParent()->getParent(); in CreateGCRelocate()
889 Function *FnGCRelocate = in CreateGCRelocate()
898 Module *M = BB->getParent()->getParent(); in CreateGCGetPointerBase()
899 Type *PtrTy = DerivedPtr->getType(); in CreateGCGetPointerBase()
900 Function *FnGCFindBase = Intrinsic::getDeclaration( in CreateGCGetPointerBase()
907 Module *M = BB->getParent()->getParent(); in CreateGCGetPointerOffset()
908 Type *PtrTy = DerivedPtr->getType(); in CreateGCGetPointerOffset()
909 Function *FnGCGetOffset = Intrinsic::getDeclaration( in CreateGCGetPointerOffset()
917 Module *M = BB->getModule(); in CreateUnaryIntrinsic()
918 Function *Fn = Intrinsic::getDeclaration(M, ID, {V->getType()}); in CreateUnaryIntrinsic()
925 Module *M = BB->getModule(); in CreateBinaryIntrinsic()
926 Function *Fn = Intrinsic::getDeclaration(M, ID, { LHS->getType() }); in CreateBinaryIntrinsic()
927 if (Value *V = Folder.FoldBinaryIntrinsic(ID, LHS, RHS, Fn->getReturnType(), in CreateBinaryIntrinsic()
938 Module *M = BB->getModule(); in CreateIntrinsic()
939 Function *Fn = Intrinsic::getDeclaration(M, ID, Types); in CreateIntrinsic()
947 Module *M = BB->getModule(); in CreateIntrinsic()
956 ArgTys.push_back(I->getType()); in CreateIntrinsic()
966 Function *Fn = Intrinsic::getDeclaration(M, ID, OverloadTys); in CreateIntrinsic()
980 UseFMF = FMFSource->getFastMathFlags(); in CreateConstrainedFPBinOp()
982 CallInst *C = CreateIntrinsic(ID, {L->getType()}, in CreateConstrainedFPBinOp()
997 UseFMF = FMFSource->getFastMathFlags(); in CreateConstrainedFPUnroundedBinOp()
1000 CreateIntrinsic(ID, {L->getType()}, {L, R, ExceptV}, nullptr, Name); in CreateConstrainedFPUnroundedBinOp()
1030 UseFMF = FMFSource->getFastMathFlags(); in CreateConstrainedFPCast()
1035 C = CreateIntrinsic(ID, {DestTy, V->getType()}, {V, RoundingV, ExceptV}, in CreateConstrainedFPCast()
1038 C = CreateIntrinsic(ID, {DestTy, V->getType()}, {V, ExceptV}, nullptr, in CreateConstrainedFPCast()
1068 CallInst *C = CreateIntrinsic(ID, {L->getType()}, in CreateConstrainedFPCmp()
1075 Function *Callee, ArrayRef<Value *> Args, const Twine &Name, in CreateConstrainedFPCall()
1082 if (Intrinsic::hasConstrainedFPRoundingModeOperand(Callee->getIntrinsicID())) in CreateConstrainedFPCall()
1098 MDNode *Prof = MDFrom->getMetadata(LLVMContext::MD_prof); in CreateSelect()
1099 MDNode *Unpred = MDFrom->getMetadata(LLVMContext::MD_unpredictable); in CreateSelect()
1109 assert(LHS->getType() == RHS->getType() && in CreatePtrDiff()
1119 assert(isa<PointerType>(Ptr->getType()) && in CreateLaunderInvariantGroup()
1121 auto *PtrType = Ptr->getType(); in CreateLaunderInvariantGroup()
1122 Module *M = BB->getParent()->getParent(); in CreateLaunderInvariantGroup()
1123 Function *FnLaunderInvariantGroup = Intrinsic::getDeclaration( in CreateLaunderInvariantGroup()
1126 assert(FnLaunderInvariantGroup->getReturnType() == PtrType && in CreateLaunderInvariantGroup()
1127 FnLaunderInvariantGroup->getFunctionType()->getParamType(0) == in CreateLaunderInvariantGroup()
1135 assert(isa<PointerType>(Ptr->getType()) && in CreateStripInvariantGroup()
1138 auto *PtrType = Ptr->getType(); in CreateStripInvariantGroup()
1139 Module *M = BB->getParent()->getParent(); in CreateStripInvariantGroup()
1140 Function *FnStripInvariantGroup = Intrinsic::getDeclaration( in CreateStripInvariantGroup()
1143 assert(FnStripInvariantGroup->getReturnType() == PtrType && in CreateStripInvariantGroup()
1144 FnStripInvariantGroup->getFunctionType()->getParamType(0) == in CreateStripInvariantGroup()
1152 auto *Ty = cast<VectorType>(V->getType()); in CreateVectorReverse()
1154 Module *M = BB->getParent()->getParent(); in CreateVectorReverse()
1155 Function *F = Intrinsic::getDeclaration(M, Intrinsic::vector_reverse, Ty); in CreateVectorReverse()
1160 int NumElts = Ty->getElementCount().getKnownMinValue(); in CreateVectorReverse()
1162 ShuffleMask.push_back(NumElts - i - 1); in CreateVectorReverse()
1168 assert(isa<VectorType>(V1->getType()) && "Unexpected type"); in CreateVectorSplice()
1169 assert(V1->getType() == V2->getType() && in CreateVectorSplice()
1172 if (auto *VTy = dyn_cast<ScalableVectorType>(V1->getType())) { in CreateVectorSplice()
1173 Module *M = BB->getParent()->getParent(); in CreateVectorSplice()
1174 Function *F = Intrinsic::getDeclaration(M, Intrinsic::vector_splice, VTy); in CreateVectorSplice()
1180 unsigned NumElts = cast<FixedVectorType>(V1->getType())->getNumElements(); in CreateVectorSplice()
1181 assert(((-Imm <= NumElts) || (Imm < NumElts)) && in CreateVectorSplice()
1186 SmallVector<int, 8> Mask; in CreateVectorSplice() local
1188 Mask.push_back(Idx + I); in CreateVectorSplice()
1190 return CreateShuffleVector(V1, V2, Mask); in CreateVectorSplice()
1204 Value *Poison = PoisonValue::get(VectorType::get(V->getType(), EC)); in CreateVectorSplat()
1216 auto *BaseType = Base->getType(); in CreatePreserveArrayAccessIndex()
1227 Module *M = BB->getParent()->getParent(); in CreatePreserveArrayAccessIndex()
1228 Function *FnPreserveArrayAccessIndex = Intrinsic::getDeclaration( in CreatePreserveArrayAccessIndex()
1234 Fn->addParamAttr( in CreatePreserveArrayAccessIndex()
1235 0, Attribute::get(Fn->getContext(), Attribute::ElementType, ElTy)); in CreatePreserveArrayAccessIndex()
1237 Fn->setMetadata(LLVMContext::MD_preserve_access_index, DbgInfo); in CreatePreserveArrayAccessIndex()
1244 assert(isa<PointerType>(Base->getType()) && in CreatePreserveUnionAccessIndex()
1246 auto *BaseType = Base->getType(); in CreatePreserveUnionAccessIndex()
1248 Module *M = BB->getParent()->getParent(); in CreatePreserveUnionAccessIndex()
1249 Function *FnPreserveUnionAccessIndex = Intrinsic::getDeclaration( in CreatePreserveUnionAccessIndex()
1256 Fn->setMetadata(LLVMContext::MD_preserve_access_index, DbgInfo); in CreatePreserveUnionAccessIndex()
1264 auto *BaseType = Base->getType(); in CreatePreserveStructAccessIndex()
1273 Module *M = BB->getParent()->getParent(); in CreatePreserveStructAccessIndex()
1274 Function *FnPreserveStructAccessIndex = Intrinsic::getDeclaration( in CreatePreserveStructAccessIndex()
1280 Fn->addParamAttr( in CreatePreserveStructAccessIndex()
1281 0, Attribute::get(Fn->getContext(), Attribute::ElementType, ElTy)); in CreatePreserveStructAccessIndex()
1283 Fn->setMetadata(LLVMContext::MD_preserve_access_index, DbgInfo); in CreatePreserveStructAccessIndex()
1290 Module *M = BB->getParent()->getParent(); in createIsFPClass()
1291 Function *FnIsFPClass = in createIsFPClass()
1292 Intrinsic::getDeclaration(M, Intrinsic::is_fpclass, {FPNum->getType()}); in createIsFPClass()
1311 assert(isa<PointerType>(PtrValue->getType()) && in CreateAlignmentAssumption()
1312 "trying to create an alignment assumption on a non-pointer?"); in CreateAlignmentAssumption()
1314 auto *PtrTy = cast<PointerType>(PtrValue->getType()); in CreateAlignmentAssumption()
1315 Type *IntPtrTy = getIntPtrTy(DL, PtrTy->getAddressSpace()); in CreateAlignmentAssumption()
1324 assert(isa<PointerType>(PtrValue->getType()) && in CreateAlignmentAssumption()
1325 "trying to create an alignment assumption on a non-pointer?"); in CreateAlignmentAssumption()