Searched refs:GEP1 (Results 1 – 4 of 4) sorted by relevance
1084 static AliasResult aliasSameBasePointerGEPs(const GEPOperator *GEP1, in aliasSameBasePointerGEPs() argument1089 assert(GEP1->getPointerOperand()->stripPointerCastsAndInvariantGroups() == in aliasSameBasePointerGEPs()1091 GEP1->getPointerOperandType() == GEP2->getPointerOperandType() && in aliasSameBasePointerGEPs()1097 if (GEP1->getNumIndices() != GEP2->getNumIndices() || in aliasSameBasePointerGEPs()1098 GEP1->getNumIndices() < 2) in aliasSameBasePointerGEPs()1111 dyn_cast<ConstantInt>(GEP1->getOperand(GEP1->getNumOperands() - 1)); in aliasSameBasePointerGEPs()1132 assert(GEP1->getNumIndices() > 1 && "Not enough GEP indices to examine"); in aliasSameBasePointerGEPs()1133 IntermediateIndices.push_back(GEP1->getOperand(1)); in aliasSameBasePointerGEPs()1137 for (unsigned i = 1, e = GEP1->getNumIndices() - 1; i != e; ++i) { in aliasSameBasePointerGEPs()1139 GEP1->getSourceElementType(), IntermediateIndices))) in aliasSameBasePointerGEPs()[all …]
5932 const GEPOperator *GEP1 = dyn_cast<GEPOperator>(Ptr1); in isPointerOffset() local5967 if (GEP1) { in isPointerOffset()5968 auto Offset = getOffsetFromBase(GEP1, Ptr2); in isPointerOffset()5983 if (!GEP1 || !GEP2 || GEP1->getOperand(0) != GEP2->getOperand(0)) in isPointerOffset()5988 for (; Idx != GEP1->getNumOperands() && Idx != GEP2->getNumOperands(); ++Idx) in isPointerOffset()5989 if (GEP1->getOperand(Idx) != GEP2->getOperand(Idx)) in isPointerOffset()5992 auto Offset1 = getOffsetFromIndex(GEP1, Idx, DL); in isPointerOffset()
1592 GEPOperator *GEP1 = nullptr, *GEP2 = nullptr; in OptimizePointerDifference() local1599 GEP1 = LHSGEP; in OptimizePointerDifference()1606 GEP1 = LHSGEP; in OptimizePointerDifference()1615 GEP1 = RHSGEP; in OptimizePointerDifference()1622 GEP1 = RHSGEP; in OptimizePointerDifference()1628 if (!GEP1) in OptimizePointerDifference()1644 unsigned NumNonConstantIndices1 = GEP1->countNonConstantIndices(); in OptimizePointerDifference()1647 ((NumNonConstantIndices1 > 0 && !GEP1->hasOneUse()) || in OptimizePointerDifference()1654 Value *Result = EmitGEPOffset(GEP1); in OptimizePointerDifference()1660 if (IsNUW && !GEP2 && !Swapped && GEP1->isInBounds() && in OptimizePointerDifference()
1652 static bool isMergedGEPInBounds(GEPOperator &GEP1, GEPOperator &GEP2) { in isMergedGEPInBounds() argument1654 if (!GEP1.isInBounds() && !GEP2.isInBounds()) in isMergedGEPInBounds()1657 return (GEP1.isInBounds() || GEP1.hasAllZeroIndices()) && in isMergedGEPInBounds()