reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Declarations

include/llvm/Analysis/VectorUtils.h
  136 class GetElementPtrInst;
include/llvm/IR/Instruction.def
  174 HANDLE_MEMORY_INST(34, GetElementPtr, GetElementPtrInst)
include/llvm/Transforms/Scalar.h
   26 class GetElementPtrInst;
include/llvm/Transforms/Scalar/NaryReassociate.h
   93 class GetElementPtrInst;

References

include/llvm/ADT/ArrayRef.h
  108         const ArrayRef<U *> &A,
  110            std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
  118       const SmallVectorTemplateCommon<U *, DummyT> &Vec,
  120           std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
include/llvm/Analysis/ObjCARCAnalysisUtils.h
  147     (isa<GetElementPtrInst>(I) &&
  148      cast<GetElementPtrInst>(I)->hasAllZeroIndices());
include/llvm/Analysis/PtrUseVisitor.h
  175   bool adjustOffsetForGEP(GetElementPtrInst &GEPI);
  267   void visitGetElementPtrInst(GetElementPtrInst &GEPI) {
include/llvm/Analysis/VectorUtils.h
  167 unsigned getGEPInductionOperand(const GetElementPtrInst *Gep);
include/llvm/IR/IRBuilder.h
  845   InstTy *Insert(InstTy *I, const Twine &Name = "") const {
  845   InstTy *Insert(InstTy *I, const Twine &Name = "") const {
 1708     return Insert(GetElementPtrInst::Create(Ty, Ptr, IdxList), Name);
 1728     return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, IdxList), Name);
 1739     return Insert(GetElementPtrInst::Create(Ty, Ptr, Idx), Name);
 1747     return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, Idx), Name);
 1761     return Insert(GetElementPtrInst::Create(Ty, Ptr, Idx), Name);
 1771     return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, Idx), Name);
 1784     return Insert(GetElementPtrInst::Create(Ty, Ptr, Idxs), Name);
 1797     return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, Idxs), Name);
 1807     return Insert(GetElementPtrInst::Create(Ty, Ptr, Idx), Name);
 1821     return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, Idx), Name);
 1839     return Insert(GetElementPtrInst::Create(Ty, Ptr, Idxs), Name);
 1857     return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, Idxs), Name);
 2538         GetElementPtrInst::getGEPReturnType(Base, IdxList);
 2581         GetElementPtrInst::getGEPReturnType(Base, {Zero, GEPIndex});
include/llvm/IR/InstVisitor.h
  176   RetTy visitGetElementPtrInst(GetElementPtrInst &I){ DELEGATE(Instruction);}
include/llvm/IR/Instructions.h
  885   GetElementPtrInst(const GetElementPtrInst &GEPI);
  904   GetElementPtrInst *cloneImpl() const;
  907   static GetElementPtrInst *Create(Type *PointeeType, Value *Ptr,
  919     return new (Values) GetElementPtrInst(PointeeType, Ptr, IdxList, Values,
  923   static GetElementPtrInst *Create(Type *PointeeType, Value *Ptr,
  935     return new (Values) GetElementPtrInst(PointeeType, Ptr, IdxList, Values,
  941   static GetElementPtrInst *CreateInBounds(Value *Ptr,
  948   static GetElementPtrInst *
  952     GetElementPtrInst *GEP =
  958   static GetElementPtrInst *CreateInBounds(Value *Ptr,
  965   static GetElementPtrInst *CreateInBounds(Type *PointeeType, Value *Ptr,
  969     GetElementPtrInst *GEP =
 1111   public VariadicOperandTraits<GetElementPtrInst, 1> {
 1119                   OperandTraits<GetElementPtrInst>::op_end(this) - Values,
 1133                   OperandTraits<GetElementPtrInst>::op_end(this) - Values,
 5275   if (auto *Gep = dyn_cast<GetElementPtrInst>(V))
include/llvm/IR/NoFolder.h
  228     return GetElementPtrInst::Create(Ty, C, IdxList);
  246     return GetElementPtrInst::CreateInBounds(Ty, C, IdxList);
include/llvm/IR/OperandTraits.h
   69   static Use *op_begin(SubClass* U) {
   71         !std::is_polymorphic<SubClass>::value,
   75   static Use *op_end(SubClass* U) {
include/llvm/IR/User.h
  127   template <int Idx, typename U> static Use &OpFrom(const U *that) {
  129       ? OperandTraits<U>::op_end(const_cast<U*>(that))[Idx]
  130       : OperandTraits<U>::op_begin(const_cast<U*>(that))[Idx];
include/llvm/IR/ValueHandle.h
  256   ValueTy *getValPtr() const { return static_cast<ValueTy *>(getRawValPtr()); }
  257   void setValPtr(ValueTy *P) { setRawValPtr(GetAsValue(P)); }
  262   AssertingVH(ValueTy *P) : ValueHandleBase(Assert, GetAsValue(P)) {}
  269   operator ValueTy*() const {
  273   ValueTy *operator=(ValueTy *RHS) {
  273   ValueTy *operator=(ValueTy *RHS) {
  277   ValueTy *operator=(const AssertingVH<ValueTy> &RHS) {
  277   ValueTy *operator=(const AssertingVH<ValueTy> &RHS) {
  282   ValueTy *operator->() const { return getValPtr(); }
  283   ValueTy &operator*() const { return *getValPtr(); }
  289   static inline AssertingVH<T> getEmptyKey() {
  290     AssertingVH<T> Res;
  295   static inline AssertingVH<T> getTombstoneKey() {
  296     AssertingVH<T> Res;
  301   static unsigned getHashValue(const AssertingVH<T> &Val) {
  305   static bool isEqual(const AssertingVH<T> &LHS, const AssertingVH<T> &RHS) {
  305   static bool isEqual(const AssertingVH<T> &LHS, const AssertingVH<T> &RHS) {
include/llvm/Support/Casting.h
   34   using SimpleType = From; // The real type this represents...
   37   static SimpleType &getSimplifiedValue(From &Val) { return Val; }
   41   using NonConstSimpleType = typename simplify_type<From>::SimpleType;
   47   static RetType getSimplifiedValue(const From& Val) {
   57   static inline bool doit(const From &Val) {
   58     return To::classof(&Val);
   66   static inline bool doit(const From &) { return true; }
   76   static inline bool doit(const From &Val) {
   77     return isa_impl<To, From>::doit(Val);
   77     return isa_impl<To, From>::doit(Val);
   92     return isa_impl<To, From>::doit(*Val);
  104   static inline bool doit(const From *Val) {
  106     return isa_impl<To, From>::doit(*Val);
  106     return isa_impl<To, From>::doit(*Val);
  122     return isa_impl_wrap<To, SimpleFrom,
  132     return isa_impl_cl<To,FromTy>::doit(Val);
  141 template <class X, class Y> LLVM_NODISCARD inline bool isa(const Y &Val) {
  142   return isa_impl_wrap<X, const Y,
  142   return isa_impl_wrap<X, const Y,
  143                        typename simplify_type<const Y>::SimpleType>::doit(Val);
  165   using ret_type = To &;       // Normal case, return Ty&
  168   using ret_type = const To &; // Normal case, return Ty&
  172   using ret_type = To *;       // Pointer arg case, return Ty*
  176   using ret_type = const To *; // Constant pointer arg case, return const Ty*
  198   using ret_type = typename cast_retty<To, SimpleFrom>::ret_type;
  204   using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
  204   using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
  210       To, From, typename simplify_type<From>::SimpleType>::ret_type;
  210       To, From, typename simplify_type<From>::SimpleType>::ret_type;
  210       To, From, typename simplify_type<From>::SimpleType>::ret_type;
  218   static typename cast_retty<To, From>::ret_type doit(From &Val) {
  219     return cast_convert_val<To, SimpleFrom,
  227   static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
  227   static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
  227   static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
  228     typename cast_retty<To, FromTy>::ret_type Res2
  228     typename cast_retty<To, FromTy>::ret_type Res2
  236       std::is_same<X, typename simplify_type<X>::SimpleType>::value;
  236       std::is_same<X, typename simplify_type<X>::SimpleType>::value;
  248                                typename cast_retty<X, const Y>::ret_type>::type
  252       X, const Y, typename simplify_type<const Y>::SimpleType>::doit(Val);
  256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
  256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
  256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
  258   return cast_convert_val<X, Y,
  258   return cast_convert_val<X, Y,
  259                           typename simplify_type<Y>::SimpleType>::doit(Val);
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  265   return cast_convert_val<X, Y*,
  265   return cast_convert_val<X, Y*,
  266                           typename simplify_type<Y*>::SimpleType>::doit(Val);
  331                             typename cast_retty<X, const Y>::ret_type>::type
  333   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  333   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  337 LLVM_NODISCARD inline typename cast_retty<X, Y>::ret_type dyn_cast(Y &Val) {
  338   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  338   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  366 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
  368   return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
  368   return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
include/llvm/Support/type_traits.h
   55 struct add_const_past_pointer { using type = const T; };
include/llvm/Transforms/Scalar/NaryReassociate.h
  120   Instruction *tryReassociateGEP(GetElementPtrInst *GEP);
  129   GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP,
  129   GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP,
  134   GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP,
  134   GetElementPtrInst *tryReassociateGEPAtIndex(GetElementPtrInst *GEP,
  165   bool requiresSignExtension(Value *Index, GetElementPtrInst *GEP);
include/llvm/Transforms/Utils/FunctionComparator.h
  346   int cmpGEPs(const GetElementPtrInst *GEPL,
  347               const GetElementPtrInst *GEPR) const {
include/llvm/Transforms/Vectorize/SLPVectorizer.h
   62   using GEPList = SmallVector<GetElementPtrInst *, 8>;
lib/Analysis/BasicAliasAnalysis.cpp
 1137     if (!isa<ArrayType>(GetElementPtrInst::getIndexedType(
 1143   auto *Ty = GetElementPtrInst::getIndexedType(
lib/Analysis/CFLGraph.h
  327     void visitGetElementPtrInst(GetElementPtrInst &Inst) {
lib/Analysis/CaptureTracking.cpp
   45   if (auto *GEP = dyn_cast<GetElementPtrInst>(O))
   45   if (auto *GEP = dyn_cast<GetElementPtrInst>(O))
lib/Analysis/ConstantFolding.cpp
  774          !isa<StructType>(GetElementPtrInst::getIndexedType(
lib/Analysis/Delinearization.cpp
   78         !isa<GetElementPtrInst>(Inst))
lib/Analysis/DependenceAnalysis.cpp
 1046   if (auto *SrcGEP = dyn_cast<GetElementPtrInst>(Ptr))
lib/Analysis/InlineCost.cpp
  207   bool isGEPFree(GetElementPtrInst &GEP);
  208   bool canFoldInboundsGEP(GetElementPtrInst &I);
  267   bool visitGetElementPtr(GetElementPtrInst &I);
  420 bool CallAnalyzer::isGEPFree(GetElementPtrInst &GEP) {
  564 bool CallAnalyzer::canFoldInboundsGEP(GetElementPtrInst &I) {
  582 bool CallAnalyzer::visitGetElementPtr(GetElementPtrInst &I) {
lib/Analysis/InstructionSimplify.cpp
 3431   if (GetElementPtrInst *GLHS = dyn_cast<GetElementPtrInst>(LHS)) {
 3431   if (GetElementPtrInst *GLHS = dyn_cast<GetElementPtrInst>(LHS)) {
 3719   if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
 3719   if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
 3999   Type *LastType = GetElementPtrInst::getIndexedType(SrcTy, Ops.slice(1));
 5335     Result = SimplifyGEPInst(cast<GetElementPtrInst>(I)->getSourceElementType(),
lib/Analysis/Loads.cpp
  188       isa<GetElementPtrInst>(A))
lib/Analysis/LoopAccessAnalysis.cpp
  936   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr))
  936   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr))
  957   auto *GEP = dyn_cast<GetElementPtrInst>(Ptr);
  957   auto *GEP = dyn_cast<GetElementPtrInst>(Ptr);
lib/Analysis/MemoryDependenceAnalysis.cpp
  410       if (auto *GEP = dyn_cast<GetElementPtrInst>(U))
  410       if (auto *GEP = dyn_cast<GetElementPtrInst>(U))
lib/Analysis/PHITransAddr.cpp
   27       isa<GetElementPtrInst>(Inst))
  214   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) {
  214   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) {
  240       if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U))
  240       if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U))
  396   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) {
  396   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Inst)) {
  406     GetElementPtrInst *Result = GetElementPtrInst::Create(
  406     GetElementPtrInst *Result = GetElementPtrInst::Create(
lib/Analysis/PtrUseVisitor.cpp
   33 bool detail::PtrUseVisitorBase::adjustOffsetForGEP(GetElementPtrInst &GEPI) {
lib/Analysis/ScalarEvolution.cpp
 3924           !isa<GetElementPtrInst>(V))
 7500   GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(LI->getOperand(0));
 7500   GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(LI->getOperand(0));
 7713       isa<SelectInst>(I) || isa<CastInst>(I) || isa<GetElementPtrInst>(I) ||
 8878     return A->isIdenticalTo(B) && (isa<BinaryOperator>(A) || isa<GetElementPtrInst>(A));
lib/Analysis/TypeMetadataUtils.cpp
   60     } else if (auto GEP = dyn_cast<GetElementPtrInst>(User)) {
lib/Analysis/VectorUtils.cpp
  128 unsigned llvm::getGEPInductionOperand(const GetElementPtrInst *Gep) {
  153   GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr);
  153   GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr);
lib/AsmParser/LLParser.cpp
 3607       if (!GetElementPtrInst::getIndexedType(Ty, Indices))
 7234   if (!GetElementPtrInst::getIndexedType(Ty, Indices))
 7236   Inst = GetElementPtrInst::Create(Ty, Ptr, Indices);
 7238     cast<GetElementPtrInst>(Inst)->setIsInBounds(true);
lib/Bitcode/Reader/BitcodeReader.cpp
 3987       I = GetElementPtrInst::Create(Ty, BasePtr, GEPIdx);
 3988       FullTy = GetElementPtrInst::getGEPReturnType(FullTy, I, GEPIdx);
 3992         cast<GetElementPtrInst>(I)->setIsInBounds(true);
lib/Bitcode/Writer/BitcodeWriter.cpp
 2645     auto &GEPInst = cast<GetElementPtrInst>(I);
lib/CodeGen/Analysis.cpp
  290     } else if (isa<GetElementPtrInst>(I)) {
  292       if (cast<GetElementPtrInst>(I)->hasAllZeroIndices())
lib/CodeGen/CodeGenPrepare.cpp
  284         SmallVector<std::pair<AssertingVH<GetElementPtrInst>, int64_t>, 32>>
  291     DenseMap<AssertingVH<GetElementPtrInst>, int> LargeOffsetGEPID;
  914 static bool getGEPSmallConstantIntOffsetV(GetElementPtrInst *GEP,
  966     auto Derived = dyn_cast<GetElementPtrInst>(ToReplace->getDerivedPtr());
 2774   std::pair<AssertingVH<GetElementPtrInst>, int64_t> &LargeOffsetGEP;
 4173       } else if (EnableGEPOffsetSplit && isa<GetElementPtrInst>(AddrInst) &&
 4182         auto *GEP = cast<GetElementPtrInst>(AddrInst);
 4182         auto *GEP = cast<GetElementPtrInst>(AddrInst);
 4185              !isa<GetElementPtrInst>(BaseI))) {
 4605     std::pair<AssertingVH<GetElementPtrInst>, int64_t> LargeOffsetGEP(nullptr,
 4713     std::pair<AssertingVH<GetElementPtrInst>, int64_t> LargeOffsetGEP(nullptr,
 4719     GetElementPtrInst *GEP = LargeOffsetGEP.first;
 5285     SmallVectorImpl<std::pair<AssertingVH<GetElementPtrInst>, int64_t>>
 5304     GetElementPtrInst *BaseGEP = LargeOffsetGEPs.begin()->first;
 5310       GetElementPtrInst *GEP = LargeOffsetGEP->first;
 6759 static bool GEPSequentialConstIndexed(GetElementPtrInst *GEP) {
 6823 static bool tryUnmergingGEPsAcrossIndirectBr(GetElementPtrInst *GEPI,
 6857   std::vector<GetElementPtrInst *> UGEPIs;
 6870     if (!isa<GetElementPtrInst>(Usr))
 6872     auto *UGEPI = cast<GetElementPtrInst>(Usr);
 6872     auto *UGEPI = cast<GetElementPtrInst>(Usr);
 6892   for (GetElementPtrInst *UGEPI : UGEPIs) {
 6900   for (GetElementPtrInst *UGEPI : UGEPIs) {
 7025   if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) {
 7025   if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) {
lib/CodeGen/GCRootLowering.cpp
  129   if (isa<AllocaInst>(I) || isa<GetElementPtrInst>(I) || isa<StoreInst>(I) ||
lib/CodeGen/InterleavedLoadCombinePass.cpp
  982     else if (isa<GetElementPtrInst>(&Ptr)) {
  983       GetElementPtrInst &GEP = *cast<GetElementPtrInst>(&Ptr);
  983       GetElementPtrInst &GEP = *cast<GetElementPtrInst>(&Ptr);
lib/CodeGen/SelectionDAG/FastISel.cpp
  349   if (const auto *GEP = dyn_cast<GetElementPtrInst>(I))
  349   if (const auto *GEP = dyn_cast<GetElementPtrInst>(I))
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
 4338   const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr);
 4338   const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr);
lib/CodeGen/ShadowStackGCLowering.cpp
   77   static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B,
   80   static GetElementPtrInst *CreateGEP(LLVMContext &Context, IRBuilder<> &B,
  255 GetElementPtrInst *ShadowStackGCLowering::CreateGEP(LLVMContext &Context,
  267   return dyn_cast<GetElementPtrInst>(Val);
  270 GetElementPtrInst *ShadowStackGCLowering::CreateGEP(LLVMContext &Context,
  279   return dyn_cast<GetElementPtrInst>(Val);
lib/ExecutionEngine/Interpreter/Execution.cpp
 1085 void Interpreter::visitGetElementPtrInst(GetElementPtrInst &I) {
lib/ExecutionEngine/Interpreter/Interpreter.h
  134   void visitGetElementPtrInst(GetElementPtrInst &I);
lib/FuzzMutate/Operations.cpp
  174     return GetElementPtrInst::Create(Ty, Srcs[0], Indices, "G", Inst);
lib/IR/AsmWriter.cpp
 4012     if (const auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
 4012     if (const auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
lib/IR/ConstantFold.cpp
 2170   Type *GEPTy = GetElementPtrInst::getGEPReturnType(
 2193       Type *Ty = GetElementPtrInst::getIndexedType(PointeeTy, Idxs);
lib/IR/Constants.cpp
 2022   Type *DestTy = GetElementPtrInst::getIndexedType(Ty, Idxs);
 2415       ResElementTy(GetElementPtrInst::getIndexedType(SrcElementTy, IdxList)) {
 3021       return GetElementPtrInst::CreateInBounds(GO->getSourceElementType(),
 3023     return GetElementPtrInst::Create(GO->getSourceElementType(), Ops[0],
lib/IR/Core.cpp
 2928   return unwrap<GetElementPtrInst>(GEP)->isInBounds();
 2932   return unwrap<GetElementPtrInst>(GEP)->setIsInBounds(InBounds);
 2960   if (auto *GEP = dyn_cast<GetElementPtrInst>(I))
 2960   if (auto *GEP = dyn_cast<GetElementPtrInst>(I))
lib/IR/Instruction.cpp
  138     cast<GetElementPtrInst>(this)->setIsInBounds(false);
  262   if (auto *SrcGEP = dyn_cast<GetElementPtrInst>(V))
  263     if (auto *DestGEP = dyn_cast<GetElementPtrInst>(this))
  263     if (auto *DestGEP = dyn_cast<GetElementPtrInst>(this))
  287   if (auto *SrcGEP = dyn_cast<GetElementPtrInst>(V))
  288     if (auto *DestGEP = dyn_cast<GetElementPtrInst>(this))
  288     if (auto *DestGEP = dyn_cast<GetElementPtrInst>(this))
lib/IR/Instructions.cpp
 1606 GetElementPtrInst::GetElementPtrInst(const GetElementPtrInst &GEPI)
 1608                   OperandTraits<GetElementPtrInst>::op_end(this) -
 4101 GetElementPtrInst *GetElementPtrInst::cloneImpl() const {
 4102   return new (getNumOperands()) GetElementPtrInst(*this);
lib/IR/Operator.cpp
   23   if (auto *I = dyn_cast<GetElementPtrInst>(this))
   29   if (auto *I = dyn_cast<GetElementPtrInst>(this))
lib/IR/SafepointIRVerifier.cpp
  344     if (const auto *GEP = dyn_cast<GetElementPtrInst>(V)) {
  344     if (const auto *GEP = dyn_cast<GetElementPtrInst>(V)) {
  691     } else if ((isa<GetElementPtrInst>(I) || isa<BitCastInst>(I)) &&
lib/IR/Verifier.cpp
  462   void visitGetElementPtrInst(GetElementPtrInst &GEP);
 3273 void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) {
 3285       GetElementPtrInst::getIndexedType(GEP.getSourceElementType(), Idxs);
lib/Target/AArch64/AArch64PromoteConstant.cpp
  284   if (isa<const GetElementPtrInst>(Instr) && OpIdx > 0)
lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  881     if (const GetElementPtrInst *GEPInst = dyn_cast<GetElementPtrInst>(U)) {
  881     if (const GetElementPtrInst *GEPInst = dyn_cast<GetElementPtrInst>(U)) {
lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
   36   DenseMap<Value*, GetElementPtrInst*> noClobberClones;
  146         PtrI = GetElementPtrInst::Create(
lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
  169     if (auto GEP = dyn_cast<GetElementPtrInst>(V)) {
  241       } else if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
  381       GetElementPtrInst *BufferIdx =
  382           dyn_cast<GetElementPtrInst>(GetElementPtrInst::Create(
  382           dyn_cast<GetElementPtrInst>(GetElementPtrInst::Create(
  399       BufferIdx = cast<GetElementPtrInst>(GetElementPtrInst::Create(
  399       BufferIdx = cast<GetElementPtrInst>(GetElementPtrInst::Create(
  548           BufferIdx = dyn_cast<GetElementPtrInst>(GetElementPtrInst::Create(
  548           BufferIdx = dyn_cast<GetElementPtrInst>(GetElementPtrInst::Create(
lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
  305                      const std::map<GetElementPtrInst *, Value *> &GEPIdx) {
  306   GetElementPtrInst *GEP = cast<GetElementPtrInst>(Ptr);
  306   GetElementPtrInst *GEP = cast<GetElementPtrInst>(Ptr);
  312 static Value* GEPToVectorIndex(GetElementPtrInst *GEP) {
  338     return isa<GetElementPtrInst>(LI->getPointerOperand()) && LI->isSimple();
  351     return (SI->getPointerOperand() == User) && isa<GetElementPtrInst>(User) && SI->isSimple();
  382   std::map<GetElementPtrInst*, Value*> GEPVectorIdx;
  385     GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(AllocaUser);
  385     GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(AllocaUser);
  586     if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UseInst)) {
  586     if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UseInst)) {
lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
  137       const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I);
  137       const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I);
lib/Target/ARM/ARMCodeGenPrepare.cpp
  922     if (isa<GetElementPtrInst>(V))
lib/Target/BPF/BPFAbstractMemberAccess.cpp
  146   void traceGEP(GetElementPtrInst *GEP, CallInst *Parent,
  295     auto *GEP = GetElementPtrInst::CreateInBounds(Call->getArgOperand(0),
  295     auto *GEP = GetElementPtrInst::CreateInBounds(Call->getArgOperand(0),
  417     } else if (auto *GI = dyn_cast<GetElementPtrInst>(Inst)) {
  417     } else if (auto *GI = dyn_cast<GetElementPtrInst>(Inst)) {
  448     } else if (auto *GI = dyn_cast<GetElementPtrInst>(Inst)) {
  448     } else if (auto *GI = dyn_cast<GetElementPtrInst>(Inst)) {
  459 void BPFAbstractMemberAccess::traceGEP(GetElementPtrInst *GEP, CallInst *Parent,
  478     } else if (auto *GI = dyn_cast<GetElementPtrInst>(Inst)) {
  478     } else if (auto *GI = dyn_cast<GetElementPtrInst>(Inst)) {
  896   auto *GEP = GetElementPtrInst::Create(Type::getInt8Ty(BB->getContext()),
  896   auto *GEP = GetElementPtrInst::Create(Type::getInt8Ty(BB->getContext()),
lib/Target/Hexagon/HexagonCommonGEP.cpp
  123     bool isHandledGepForm(GetElementPtrInst *GepI);
  124     void processGepInst(GetElementPtrInst *GepI, ValueToNodeMap &NM);
  333 bool HexagonCommonGEP::isHandledGepForm(GetElementPtrInst *GepI) {
  343 void HexagonCommonGEP::processGepInst(GetElementPtrInst *GepI,
  369     if (isa<GetElementPtrInst>(*UI)) {
  370       GetElementPtrInst *UserG = cast<GetElementPtrInst>(*UI);
  370       GetElementPtrInst *UserG = cast<GetElementPtrInst>(*UI);
  421       if (!isa<GetElementPtrInst>(J))
  423       GetElementPtrInst *GepI = cast<GetElementPtrInst>(J);
  423       GetElementPtrInst *GepI = cast<GetElementPtrInst>(J);
 1098   GetElementPtrInst *NewInst = nullptr;
 1128     NewInst = GetElementPtrInst::Create(ElTy, Input, A, "cgep", &*At);
lib/Target/NVPTX/NVPTXLowerAlloca.cpp
  103           auto GI = dyn_cast<GetElementPtrInst>(AllocaUse.getUser());
lib/Target/PowerPC/PPCLoopPreIncPrep.cpp
  169   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(StrippedBasePtr))
  169   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(StrippedBasePtr))
  388   GetElementPtrInst *PtrInc = GetElementPtrInst::Create(
  388   GetElementPtrInst *PtrInc = GetElementPtrInst::Create(
  436       GetElementPtrInst *NewPtr = GetElementPtrInst::Create(
  436       GetElementPtrInst *NewPtr = GetElementPtrInst::Create(
lib/Target/X86/X86FastISel.cpp
  959     if (const GetElementPtrInst *GEP =
  960           dyn_cast<GetElementPtrInst>(U->getOperand(0))) {
lib/Target/X86/X86ISelLowering.cpp
38982     if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(MemOp)) {
38982     if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(MemOp)) {
lib/Target/X86/X86TargetTransformInfo.cpp
 3098     if (auto GEP = dyn_cast<GetElementPtrInst>(Ptr)) {
 3121     GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr);
 3121     GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr);
lib/Target/X86/X86WinEHState.cpp
  444   if (auto *GEP = dyn_cast<GetElementPtrInst>(Link)) {
  444   if (auto *GEP = dyn_cast<GetElementPtrInst>(Link)) {
  445     GEP = cast<GetElementPtrInst>(GEP->clone());
lib/Transforms/Coroutines/CoroFrame.cpp
  942   return isa<CastInst>(&V) || isa<GetElementPtrInst>(&V) ||
lib/Transforms/IPO/ArgumentPromotion.cpp
  173           SrcTy = cast<GetElementPtrInst>(UI)->getSourceElementType();
  198         Params.push_back(GetElementPtrInst::getIndexedType(
  398         Value *Idx = GetElementPtrInst::Create(
  438         GetElementPtrInst *GEP = cast<GetElementPtrInst>(I->user_back());
  438         GetElementPtrInst *GEP = cast<GetElementPtrInst>(I->user_back());
  630       if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V)) {
  630       if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(V)) {
  679     } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UR)) {
  679     } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UR)) {
  828     if (isa<GetElementPtrInst>(V) || isa<PHINode>(V)) {
lib/Transforms/IPO/Attributor.cpp
 3694       if (isa<GetElementPtrInst>(UserI) || isa<BitCastInst>(UserI)) {
lib/Transforms/IPO/GlobalOpt.cpp
  174     if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I)) {
  174     if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I)) {
  319     } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(U)) {
  319     } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(U)) {
  414   return isa<GetElementPtrInst>(I) && isSafeSROAGEP(I);
  422     if (!isa<GetElementPtrInst>(U) &&
  577         GetElementPtrInst *GEPI = cast<GetElementPtrInst>(GEP);
  577         GetElementPtrInst *GEPI = cast<GetElementPtrInst>(GEP);
  582         NewPtr = GetElementPtrInst::Create(
  588     if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(GEP))
  588     if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(GEP))
  642     } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) {
  642     } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) {
  722     } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) {
  722     } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(I)) {
  982     if (isa<GetElementPtrInst>(Inst) && Inst->getNumOperands() >= 3) {
 1032     } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) {
 1032     } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) {
 1072     if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(UI)) {
 1072     if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(UI)) {
 1217   if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(LoadUser)) {
 1217   if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(LoadUser)) {
 1231     Value *NGEPI = GetElementPtrInst::Create(GEPI->getResultElementType(), NewPtr, GEPIdx,
lib/Transforms/IPO/PartialInlining.cpp
  861       if (cast<GetElementPtrInst>(&I)->hasAllZeroIndices())
lib/Transforms/InstCombine/InstCombineCasts.cpp
 1782   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Src)) {
 1782   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Src)) {
 2341       GetElementPtrInst *GEP =
 2342           GetElementPtrInst::Create(SrcPTy->getElementType(), Src, Idxs);
lib/Transforms/InstCombine/InstCombineCompares.cpp
  145 Instruction *InstCombiner::foldCmpLoadFromIndexedGlobal(GetElementPtrInst *GEP,
  548           !isa<GetElementPtrInst>(V) && !isa<PHINode>(V))
  857   if (!isa<GetElementPtrInst>(RHS))
 1059     if (isa<BitCastInst>(V) || isa<GetElementPtrInst>(V) || isa<PHINode>(V) ||
 1837     if (auto *GEP = dyn_cast<GetElementPtrInst>(LI->getOperand(0)))
 1837     if (auto *GEP = dyn_cast<GetElementPtrInst>(LI->getOperand(0)))
 3179         cast<GetElementPtrInst>(LHSI)->hasAllZeroIndices())
 3251     if (GetElementPtrInst *GEP =
 3252             dyn_cast<GetElementPtrInst>(LHSI->getOperand(0))) {
 6059       if (auto *GEP = dyn_cast<GetElementPtrInst>(LHSI->getOperand(0)))
 6059       if (auto *GEP = dyn_cast<GetElementPtrInst>(LHSI->getOperand(0)))
lib/Transforms/InstCombine/InstCombineInternal.h
  430   Instruction *visitGetElementPtrInst(GetElementPtrInst &GEP);
  905   Instruction *foldCmpLoadFromIndexedGlobal(GetElementPtrInst *GEP,
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
   84       if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
   84       if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
  215       Instruction *GEP = GetElementPtrInst::CreateInBounds(
  277     } else if (isa<GetElementPtrInst>(Inst) || isa<BitCastInst>(Inst)) {
  306   } else if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
  306   } else if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
  311     auto *NewI = GetElementPtrInst::Create(
  311     auto *NewI = GetElementPtrInst::Create(
  837 static bool canReplaceGEPIdxWithZero(InstCombiner &IC, GetElementPtrInst *GEPI,
  868     GetElementPtrInst::getIndexedType(GEPI->getSourceElementType(), Ops);
  909   if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) {
  909   if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr)) {
  929   if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr))
  929   if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Ptr))
  936   if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) {
  936   if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) {
 1301       isa<GetElementPtrInst>(A))
 1392     if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr)) {
 1392     if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr)) {
lib/Transforms/InstCombine/InstCombinePHI.cpp
  113       } else if (GetElementPtrInst *GI = dyn_cast<GetElementPtrInst>(U)) {
  113       } else if (GetElementPtrInst *GI = dyn_cast<GetElementPtrInst>(U)) {
  377   GetElementPtrInst *FirstInst =cast<GetElementPtrInst>(PN.getIncomingValue(0));
  377   GetElementPtrInst *FirstInst =cast<GetElementPtrInst>(PN.getIncomingValue(0));
  394     GetElementPtrInst *GEP= dyn_cast<GetElementPtrInst>(PN.getIncomingValue(i));
  394     GetElementPtrInst *GEP= dyn_cast<GetElementPtrInst>(PN.getIncomingValue(i));
  467       GetElementPtrInst *InGEP =cast<GetElementPtrInst>(PN.getIncomingValue(i));
  467       GetElementPtrInst *InGEP =cast<GetElementPtrInst>(PN.getIncomingValue(i));
  477   GetElementPtrInst *NewGEP =
  478       GetElementPtrInst::Create(FirstInst->getSourceElementType(), Base,
  523   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(L->getOperand(0)))
  523   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(L->getOperand(0)))
  733   if (isa<GetElementPtrInst>(FirstInst))
 1168         (isa<BinaryOperator>(PHIUser) || isa<GetElementPtrInst>(PHIUser)) &&
lib/Transforms/InstCombine/InstCombineSelect.cpp
  353       (!isa<BinaryOperator>(TI) && !isa<GetElementPtrInst>(TI)) ||
  404   if (auto *TGEP = dyn_cast<GetElementPtrInst>(TI)) {
  404   if (auto *TGEP = dyn_cast<GetElementPtrInst>(TI)) {
  405     auto *FGEP = cast<GetElementPtrInst>(FI);
  405     auto *FGEP = cast<GetElementPtrInst>(FI);
  408                ? GetElementPtrInst::CreateInBounds(ElementType, Op0, {Op1})
  409                : GetElementPtrInst::Create(ElementType, Op0, {Op1});
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
 1195     if (mayIndexStructType(cast<GetElementPtrInst>(*I)))
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
 1280       GetElementPtrInst *GEP = GetElementPtrInst::Create(
 1280       GetElementPtrInst *GEP = GetElementPtrInst::Create(
 1281           cast<GetElementPtrInst>(I)->getSourceElementType(), Ptr, Idx, "", I);
 1282       GEP->setIsInBounds(cast<GetElementPtrInst>(I)->isInBounds());
lib/Transforms/InstCombine/InstructionCombining.cpp
 1618 Instruction *InstCombiner::visitGetElementPtrInst(GetElementPtrInst &GEP) {
 1688     auto *Op1 = dyn_cast<GetElementPtrInst>(PN->getOperand(0));
 1688     auto *Op1 = dyn_cast<GetElementPtrInst>(PN->getOperand(0));
 1704       auto *Op2 = dyn_cast<GetElementPtrInst>(*I);
 1704       auto *Op2 = dyn_cast<GetElementPtrInst>(*I);
 1761     auto *NewGEP = cast<GetElementPtrInst>(Op1->clone());
 1761     auto *NewGEP = cast<GetElementPtrInst>(Op1->clone());
 1839             auto *NewSrc = cast<GetElementPtrInst>(
 1839             auto *NewSrc = cast<GetElementPtrInst>(
 1842             auto *NewGEP = GetElementPtrInst::Create(GEPEltType, NewSrc, {SO1});
 1842             auto *NewGEP = GetElementPtrInst::Create(GEPEltType, NewSrc, {SO1});
 1905                  ? GetElementPtrInst::CreateInBounds(
 1908                  : GetElementPtrInst::Create(Src->getSourceElementType(),
 1984           GetElementPtrInst *Res = GetElementPtrInst::Create(
 1984           GetElementPtrInst *Res = GetElementPtrInst::Create(
 2247           return GetElementPtrInst::CreateInBounds(
 2404       } else if (isa<BitCastInst>(I) || isa<GetElementPtrInst>(I) ||
lib/Transforms/Instrumentation/ControlHeightReduction.cpp
  497       isa<GetElementPtrInst>(I) || isa<CmpInst>(I) ||
lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
  444   void visitGetElementPtrInst(GetElementPtrInst &GEPI);
 1414 void DFSanVisitor::visitGetElementPtrInst(GetElementPtrInst &GEPI) {
lib/Transforms/Instrumentation/MemorySanitizer.cpp
 3574   void visitGetElementPtrInst(GetElementPtrInst &I) {
lib/Transforms/Instrumentation/SanitizerCoverage.cpp
  201                          ArrayRef<GetElementPtrInst *> GepTraceTargets);
  598   SmallVector<GetElementPtrInst *, 8> GepTraceTargets;
  626         if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&Inst))
  626         if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&Inst))
  802     Function &, ArrayRef<GetElementPtrInst *> GepTraceTargets) {
lib/Transforms/Instrumentation/ThreadSanitizer.cpp
  340   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Addr))
  340   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Addr))
lib/Transforms/ObjCARC/ObjCARCOpts.cpp
   95     if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Arg))
   95     if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Arg))
lib/Transforms/Scalar/ConstantHoisting.cpp
  746       Mat = GetElementPtrInst::Create(Int8PtrTy->getElementType(), Base,
lib/Transforms/Scalar/DeadStoreElimination.cpp
  949     GetElementPtrInst *NewDestGEP = GetElementPtrInst::CreateInBounds(
  949     GetElementPtrInst *NewDestGEP = GetElementPtrInst::CreateInBounds(
lib/Transforms/Scalar/EarlyCSE.cpp
  112            isa<BinaryOperator>(Inst) || isa<GetElementPtrInst>(Inst) ||
lib/Transforms/Scalar/GVN.cpp
 1337   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(LI->getOperand(0))) {
 1337   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(LI->getOperand(0))) {
 1338     for (GetElementPtrInst::op_iterator OI = GEP->idx_begin(),
 2264   if (isa<GetElementPtrInst>(CurInst))
lib/Transforms/Scalar/GVNHoist.cpp
  833           if (const GetElementPtrInst *GepOp =
  834                   dyn_cast<GetElementPtrInst>(Inst)) {
  863         if (GetElementPtrInst *GepOp = dyn_cast<GetElementPtrInst>(Op))
  863         if (GetElementPtrInst *GepOp = dyn_cast<GetElementPtrInst>(Op))
  877       const GetElementPtrInst *OtherGep;
  879         OtherGep = cast<GetElementPtrInst>(OtherLd->getPointerOperand());
  881         OtherGep = cast<GetElementPtrInst>(
  977     GetElementPtrInst *Gep = nullptr;
  980       Gep = dyn_cast<GetElementPtrInst>(Ld->getPointerOperand());
  982       Gep = dyn_cast<GetElementPtrInst>(St->getPointerOperand());
  986         if (isa<GetElementPtrInst>(Val)) {
 1001     if (Val && isa<GetElementPtrInst>(Val))
 1121         } else if (HoistingGeps || !isa<GetElementPtrInst>(&I1))
lib/Transforms/Scalar/InferAddressSpaces.cpp
  357     if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
  357     if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
  484     GetElementPtrInst *GEP = cast<GetElementPtrInst>(I);
  484     GetElementPtrInst *GEP = cast<GetElementPtrInst>(I);
  485     GetElementPtrInst *NewGEP = GetElementPtrInst::Create(
  485     GetElementPtrInst *NewGEP = GetElementPtrInst::Create(
lib/Transforms/Scalar/LICM.cpp
 1038           isa<SelectInst>(I) || isa<GetElementPtrInst>(I) || isa<CmpInst>(I) ||
 1301   if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I)) {
 1301   if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I)) {
lib/Transforms/Scalar/LoopInterchange.cpp
 1034       if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&Ins)) {
 1034       if (const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&Ins)) {
lib/Transforms/Scalar/LoopRerollPass.cpp
  766       (!BO && !isa<GetElementPtrInst>(U)))
  794     } else if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
  794     } else if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
lib/Transforms/Scalar/MemCpyOptimizer.cpp
  829     if (GetElementPtrInst *G = dyn_cast<GetElementPtrInst>(U)) {
  829     if (GetElementPtrInst *G = dyn_cast<GetElementPtrInst>(U)) {
lib/Transforms/Scalar/MergeICmps.cpp
   82   BCEAtom(GetElementPtrInst *GEP, LoadInst *LoadI, int BaseId, APInt Offset)
  113   GetElementPtrInst *GEP = nullptr;
  156   auto *const GEP = dyn_cast<GetElementPtrInst>(Addr);
  156   auto *const GEP = dyn_cast<GetElementPtrInst>(Addr);
lib/Transforms/Scalar/MergedLoadStoreMotion.cpp
  234          (A1->getParent() == S1->getParent()) && isa<GetElementPtrInst>(A0);
lib/Transforms/Scalar/NaryReassociate.cpp
  291     return tryReassociateGEP(cast<GetElementPtrInst>(I));
  297 static bool isGEPFoldable(GetElementPtrInst *GEP,
  306 Instruction *NaryReassociatePass::tryReassociateGEP(GetElementPtrInst *GEP) {
  314       if (auto *NewGEP = tryReassociateGEPAtIndex(GEP, I - 1,
  324                                                 GetElementPtrInst *GEP) {
  330 GetElementPtrInst *
  331 NaryReassociatePass::tryReassociateGEPAtIndex(GetElementPtrInst *GEP,
  353     if (auto *NewGEP = tryReassociateGEPAtIndex(GEP, I, LHS, RHS, IndexedType))
  357       if (auto *NewGEP =
  365 GetElementPtrInst *
  366 NaryReassociatePass::tryReassociateGEPAtIndex(GetElementPtrInst *GEP,
  429   GetElementPtrInst *NewGEP = cast<GetElementPtrInst>(
  429   GetElementPtrInst *NewGEP = cast<GetElementPtrInst>(
lib/Transforms/Scalar/NewGVN.cpp
 1019   if (auto *GEP = dyn_cast<GetElementPtrInst>(I))
 1019   if (auto *GEP = dyn_cast<GetElementPtrInst>(I))
 1176   } else if (isa<GetElementPtrInst>(I)) {
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
  467   if (auto *GEP = dyn_cast<GetElementPtrInst>(I))
  467   if (auto *GEP = dyn_cast<GetElementPtrInst>(I))
  537   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I))
  537   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I))
 1935   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(CurrentValue)) {
 1935   if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(CurrentValue)) {
 1970     } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Instr)) {
 1970     } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Instr)) {
 2605     if (!isa<GetElementPtrInst>(I))
lib/Transforms/Scalar/SCCP.cpp
  633   void visitGetElementPtrInst(GetElementPtrInst &I);
 1102 void SCCPSolver::visitGetElementPtrInst(GetElementPtrInst &I) {
lib/Transforms/Scalar/SROA.cpp
  723   void visitGetElementPtrInst(GetElementPtrInst &GEPI) {
  975       if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I)) {
  975       if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I)) {
 3444   bool visitGetElementPtrInst(GetElementPtrInst &GEPI) {
lib/Transforms/Scalar/Scalarizer.cpp
  190   bool visitGetElementPtrInst(GetElementPtrInst &GEPI);
  598 bool ScalarizerVisitor::visitGetElementPtrInst(GetElementPtrInst &GEPI) {
  637       if (GetElementPtrInst *NewGEPI = dyn_cast<GetElementPtrInst>(Res[I]))
  637       if (GetElementPtrInst *NewGEPI = dyn_cast<GetElementPtrInst>(Res[I]))
lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
  236   static Value *Extract(Value *Idx, GetElementPtrInst *GEP,
  242   static int64_t Find(Value *Idx, GetElementPtrInst *GEP,
  372   bool splitGEP(GetElementPtrInst *GEP);
  381   void lowerToSingleIndexGEPs(GetElementPtrInst *Variadic,
  391   void lowerToArithmetics(GetElementPtrInst *Variadic,
  399   int64_t accumulateByteOffset(GetElementPtrInst *GEP, bool &NeedsExtraction);
  416   bool canonicalizeArrayIndicesToPointerSize(GetElementPtrInst *GEP);
  441   void swapGEPOperand(GetElementPtrInst *First, GetElementPtrInst *Second);
  441   void swapGEPOperand(GetElementPtrInst *First, GetElementPtrInst *Second);
  444   bool isLegalToSwapOperand(GetElementPtrInst *First, GetElementPtrInst *Second,
  444   bool isLegalToSwapOperand(GetElementPtrInst *First, GetElementPtrInst *Second,
  735 Value *ConstantOffsetExtractor::Extract(Value *Idx, GetElementPtrInst *GEP,
  753 int64_t ConstantOffsetExtractor::Find(Value *Idx, GetElementPtrInst *GEP,
  763     GetElementPtrInst *GEP) {
  781 SeparateConstOffsetFromGEP::accumulateByteOffset(GetElementPtrInst *GEP,
  814     GetElementPtrInst *Variadic, int64_t AccumulativeByteOffset) {
  872   GetElementPtrInst *FirstGEP = dyn_cast_or_null<GetElementPtrInst>(FirstResult);
  872   GetElementPtrInst *FirstGEP = dyn_cast_or_null<GetElementPtrInst>(FirstResult);
  873   GetElementPtrInst *SecondGEP = dyn_cast_or_null<GetElementPtrInst>(ResultPtr);
  873   GetElementPtrInst *SecondGEP = dyn_cast_or_null<GetElementPtrInst>(ResultPtr);
  885 SeparateConstOffsetFromGEP::lowerToArithmetics(GetElementPtrInst *Variadic,
  930 bool SeparateConstOffsetFromGEP::splitGEP(GetElementPtrInst *GEP) {
 1073     NewGEP = GetElementPtrInst::Create(GEP->getResultElementType(), NewGEP,
 1078     cast<GetElementPtrInst>(NewGEP)->setIsInBounds(GEPWasInBounds);
 1097     NewGEP = GetElementPtrInst::Create(
 1103     cast<GetElementPtrInst>(NewGEP)->setIsInBounds(GEPWasInBounds);
 1128       if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I++))
 1128       if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(I++))
 1225     GetElementPtrInst *FirstGEP, GetElementPtrInst *SecondGEP, Loop *CurLoop) {
 1225     GetElementPtrInst *FirstGEP, GetElementPtrInst *SecondGEP, Loop *CurLoop) {
 1291 void SeparateConstOffsetFromGEP::swapGEPOperand(GetElementPtrInst *First,
 1292                                                 GetElementPtrInst *Second) {
lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
  200   void allocateCandidatesAndFindBasisForGEP(GetElementPtrInst *GEP);
  221                         GetElementPtrInst *GEP);
  272 static bool isGEPFoldable(GetElementPtrInst *GEP,
  296     return isGEPFoldable(cast<GetElementPtrInst>(C.Ins), TTI);
  301 static bool hasOnlyOneNonZeroIndex(GetElementPtrInst *GEP) {
  323             hasOnlyOneNonZeroIndex(cast<GetElementPtrInst>(C.Ins)));
  381     allocateCandidatesAndFindBasisForGEP(cast<GetElementPtrInst>(I));
  485                                                   GetElementPtrInst *GEP) {
  518     GetElementPtrInst *GEP) {
  584             cast<GetElementPtrInst>(Basis.Ins)->getResultElementType()));
  668       bool InBounds = cast<GetElementPtrInst>(C.Ins)->isInBounds();
  686               cast<GetElementPtrInst>(Basis.Ins)->getResultElementType(),
  690               cast<GetElementPtrInst>(Basis.Ins)->getResultElementType(),
lib/Transforms/Utils/CodeExtractor.cpp
  937       GetElementPtrInst *GEP = GetElementPtrInst::Create(
  937       GetElementPtrInst *GEP = GetElementPtrInst::Create(
 1120       GetElementPtrInst *GEP = GetElementPtrInst::Create(
 1120       GetElementPtrInst *GEP = GetElementPtrInst::Create(
 1159       GetElementPtrInst *GEP = GetElementPtrInst::Create(
 1159       GetElementPtrInst *GEP = GetElementPtrInst::Create(
 1262       GetElementPtrInst *GEP = GetElementPtrInst::Create(
 1262       GetElementPtrInst *GEP = GetElementPtrInst::Create(
lib/Transforms/Utils/Evaluator.cpp
  433     } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(CurInst)) {
  433     } else if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(CurInst)) {
lib/Transforms/Utils/FunctionComparator.cpp
  508   if (const GetElementPtrInst *GEPL = dyn_cast<GetElementPtrInst>(L)) {
  508   if (const GetElementPtrInst *GEPL = dyn_cast<GetElementPtrInst>(L)) {
  510     const GetElementPtrInst *GEPR = cast<GetElementPtrInst>(R);
  510     const GetElementPtrInst *GEPR = cast<GetElementPtrInst>(R);
lib/Transforms/Utils/GlobalStatus.cpp
  140       } else if (isa<BitCastInst>(I) || isa<GetElementPtrInst>(I)) {
lib/Transforms/Utils/Local.cpp
 1675   } else if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
 1675   } else if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
 2982   } else if (GetElementPtrInst *EP = dyn_cast<GetElementPtrInst>(V)) {
 2982   } else if (GetElementPtrInst *EP = dyn_cast<GetElementPtrInst>(V)) {
lib/Transforms/Utils/PromoteMemoryToRegister.cpp
   91     } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) {
   91     } else if (const GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(U)) {
lib/Transforms/Utils/SimplifyCFG.cpp
 3011       if (!isa<BinaryOperator>(I) && !isa<GetElementPtrInst>(I))
 5986     if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Use))
 5986     if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Use))
lib/Transforms/Utils/ValueMapper.cpp
  918   if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
  918   if (auto *GEP = dyn_cast<GetElementPtrInst>(I)) {
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
  398   auto *GEPA = dyn_cast<GetElementPtrInst>(PtrA);
  398   auto *GEPA = dyn_cast<GetElementPtrInst>(PtrA);
  399   auto *GEPB = dyn_cast<GetElementPtrInst>(PtrB);
  399   auto *GEPB = dyn_cast<GetElementPtrInst>(PtrB);
  574     if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(PtrOperand))
  574     if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(PtrOperand))
lib/Transforms/Vectorize/LoopVectorize.cpp
 2201   if (auto *gep = dyn_cast<GetElementPtrInst>(Ptr->stripPointerCasts()))
 2201   if (auto *gep = dyn_cast<GetElementPtrInst>(Ptr->stripPointerCasts()))
 2220       cast<GetElementPtrInst>(NewPtr)->setIsInBounds(true);
 2393   if (auto *gep = dyn_cast<GetElementPtrInst>(
 2393   if (auto *gep = dyn_cast<GetElementPtrInst>(
 2399     GetElementPtrInst *PartPtr = nullptr;
 2404       PartPtr = cast<GetElementPtrInst>(
 2407       PartPtr = cast<GetElementPtrInst>(
 2413       PartPtr = cast<GetElementPtrInst>(
 3171            isa<ShuffleVectorInst>(I) || isa<GetElementPtrInst>(I);
 4073     auto *GEP = cast<GetElementPtrInst>(&I);
 4073     auto *GEP = cast<GetElementPtrInst>(&I);
 4393             isa<GetElementPtrInst>(V)) &&
 5704   auto *Gep = dyn_cast<GetElementPtrInst>(Ptr);
 5704   auto *Gep = dyn_cast<GetElementPtrInst>(Ptr);
lib/Transforms/Vectorize/SLPVectorizer.cpp
 3016                          [](User *U) { return isa<GetElementPtrInst>(U); })) {
 4089       for (int j = 1, e = cast<GetElementPtrInst>(VL0)->getNumOperands(); j < e;
 4096           cast<GetElementPtrInst>(VL0)->getSourceElementType(), Op0, OpVecs);
 4960     else if (isa<PHINode>(I) || isa<CastInst>(I) || isa<GetElementPtrInst>(I) ||
 5129         return isa<GetElementPtrInst>(R->user_back());
 5482     else if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
 5482     else if (auto *GEP = dyn_cast<GetElementPtrInst>(&I)) {
 7062         auto *GEPI = GEPList[I];
 7067           auto *GEPJ = GEPList[J];
 7089         auto *GEP = cast<GetElementPtrInst>(V);
 7089         auto *GEP = cast<GetElementPtrInst>(V);
tools/clang/lib/CodeGen/Address.h
  108 template <class U> inline U cast(CodeGen::Address addr) {
tools/clang/lib/CodeGen/CGBuilder.h
  262     auto *GEP = cast<llvm::GetElementPtrInst>(CreateConstInBoundsGEP2_32(
  262     auto *GEP = cast<llvm::GetElementPtrInst>(CreateConstInBoundsGEP2_32(
tools/clang/lib/CodeGen/CGExprAgg.cpp
 1619       if (llvm::GetElementPtrInst *GEP =
 1620             dyn_cast<llvm::GetElementPtrInst>(LV.getPointer()))
tools/lldb/source/Expression/IRInterpreter.cpp
 1009       const GetElementPtrInst *gep_inst = dyn_cast<GetElementPtrInst>(inst);
 1009       const GetElementPtrInst *gep_inst = dyn_cast<GetElementPtrInst>(inst);
tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
 1611                 return GetElementPtrInst::Create(
 1794             GetElementPtrInst *get_element_ptr = GetElementPtrInst::Create(
 1794             GetElementPtrInst *get_element_ptr = GetElementPtrInst::Create(
tools/polly/include/polly/Support/ScopHelper.h
  460 getIndexExpressionsFromGEP(llvm::GetElementPtrInst *GEP,
tools/polly/lib/Analysis/ScopBuilder.cpp
 1398   if (auto *Slot = dyn_cast<GetElementPtrInst>(Address)) {
 1398   if (auto *Slot = dyn_cast<GetElementPtrInst>(Address)) {
 1464   if (auto *SlotGEP = dyn_cast<GetElementPtrInst>(Slot)) {
 1464   if (auto *SlotGEP = dyn_cast<GetElementPtrInst>(Slot)) {
 1626   auto *GEP = dyn_cast<GetElementPtrInst>(Address);
 1626   auto *GEP = dyn_cast<GetElementPtrInst>(Address);
tools/polly/lib/Support/ScopHelper.cpp
  538 static bool hasVariantIndex(GetElementPtrInst *Gep, Loop *L, Region &R,
  562   if (auto *GepInst = dyn_cast<GetElementPtrInst>(Ptr)) {
  562   if (auto *GepInst = dyn_cast<GetElementPtrInst>(Ptr)) {
  662 polly::getIndexExpressionsFromGEP(GetElementPtrInst *GEP, ScalarEvolution &SE) {
unittests/Analysis/BasicAliasAnalysisTest.cpp
  114   auto *I8AtUncertainOffset =
  115       cast<GetElementPtrInst>(B.CreateGEP(B.getInt8Ty(), I8, ArbitraryI32));
unittests/Analysis/ScalarEvolutionTest.cpp
  178   GetElementPtrInst *Gep0 =
  179       GetElementPtrInst::Create(I32Ty, Alloca, Ci32, "gep0", Br);
  182   GetElementPtrInst *Gep1 =
  183       GetElementPtrInst::Create(I8Ty, CastA, Ci32, "gep1", Br);
  184   GetElementPtrInst *Gep2 = GetElementPtrInst::Create(
  184   GetElementPtrInst *Gep2 = GetElementPtrInst::Create(
  710     Accum = GetElementPtrInst::Create(I8Ty, Accum, PN, "gep", EndBB);
unittests/IR/InstructionsTest.cpp
  338   GetElementPtrInst *Gep0 = GetElementPtrInst::Create(I32Ty, PtrVecA, C2xi32a);
  338   GetElementPtrInst *Gep0 = GetElementPtrInst::Create(I32Ty, PtrVecA, C2xi32a);
  339   GetElementPtrInst *Gep1 = GetElementPtrInst::Create(I32Ty, PtrVecA, C2xi32b);
  339   GetElementPtrInst *Gep1 = GetElementPtrInst::Create(I32Ty, PtrVecA, C2xi32b);
  340   GetElementPtrInst *Gep2 = GetElementPtrInst::Create(I32Ty, PtrVecB, C2xi32a);
  340   GetElementPtrInst *Gep2 = GetElementPtrInst::Create(I32Ty, PtrVecB, C2xi32a);
  341   GetElementPtrInst *Gep3 = GetElementPtrInst::Create(I32Ty, PtrVecB, C2xi32b);
  341   GetElementPtrInst *Gep3 = GetElementPtrInst::Create(I32Ty, PtrVecB, C2xi32b);
  369   GetElementPtrInst *GepII0 = GetElementPtrInst::Create(I32Ty, Gep0, C2xi32b);
  369   GetElementPtrInst *GepII0 = GetElementPtrInst::Create(I32Ty, Gep0, C2xi32b);
  370   GetElementPtrInst *GepII1 = GetElementPtrInst::Create(I32Ty, Gep1, C2xi32a);
  370   GetElementPtrInst *GepII1 = GetElementPtrInst::Create(I32Ty, Gep1, C2xi32a);
  371   GetElementPtrInst *GepII2 = GetElementPtrInst::Create(I32Ty, Gep2, C2xi32b);
  371   GetElementPtrInst *GepII2 = GetElementPtrInst::Create(I32Ty, Gep2, C2xi32b);
  372   GetElementPtrInst *GepII3 = GetElementPtrInst::Create(I32Ty, Gep3, C2xi32a);
  372   GetElementPtrInst *GepII3 = GetElementPtrInst::Create(I32Ty, Gep3, C2xi32a);
  650     auto *GI = cast<GetElementPtrInst>(
  650     auto *GI = cast<GetElementPtrInst>(
  672   auto *GEPI = cast<GetElementPtrInst>(V);
  672   auto *GEPI = cast<GetElementPtrInst>(V);
  681   const auto *CGEPI = GEPI;
unittests/Transforms/Utils/CloningTest.cpp
   38   T *clone(T *V1) {
   38   T *clone(T *V1) {
   42     return cast<T>(V2);
  143   GetElementPtrInst *GEP =
  144       GetElementPtrInst::Create(Type::getInt32Ty(context), V, ops);
usr/include/c++/7.4.0/type_traits
  381     : public __is_pointer_helper<typename remove_cv<_Tp>::type>::type
 1554     { typedef _Tp     type; };
 1558     { typedef _Tp     type; };
 1563     { typedef _Tp     type; };
 1574       remove_const<typename remove_volatile<_Tp>::type>::type     type;
 1983     { typedef _Up     type; };
utils/unittest/googletest/include/gtest/gtest-printers.h
  407                     T* p, ::std::ostream* os) {
  416     if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) {