Lines Matching refs:GEPLHS

600 Instruction *InstCombiner::FoldGEPICmp(GEPOperator *GEPLHS, Value *RHS,  in FoldGEPICmp()  argument
616 Value *PtrBase = GEPLHS->getOperand(0); in FoldGEPICmp()
617 if (PtrBase == RHS && GEPLHS->isInBounds()) { in FoldGEPICmp()
622 Value *Offset = EvaluateGEPOffsetExpression(GEPLHS, *this, DL); in FoldGEPICmp()
626 Offset = EmitGEPOffset(GEPLHS); in FoldGEPICmp()
633 bool IndicesTheSame = GEPLHS->getNumOperands()==GEPRHS->getNumOperands(); in FoldGEPICmp()
634 IndicesTheSame &= GEPLHS->getOperand(0)->getType() == in FoldGEPICmp()
637 for (unsigned i = 1, e = GEPLHS->getNumOperands(); i != e; ++i) in FoldGEPICmp()
638 if (GEPLHS->getOperand(i) != GEPRHS->getOperand(i)) { in FoldGEPICmp()
645 return new ICmpInst(Cond, GEPLHS->getOperand(0), GEPRHS->getOperand(0)); in FoldGEPICmp()
650 if (GEPLHS->isInBounds() && GEPRHS->isInBounds() && in FoldGEPICmp()
651 (GEPLHS->hasAllConstantIndices() || GEPLHS->hasOneUse()) && in FoldGEPICmp()
655 Value *LOffset = EmitGEPOffset(GEPLHS); in FoldGEPICmp()
682 if (GEPLHS->hasAllZeroIndices()) in FoldGEPICmp()
683 return FoldGEPICmp(GEPRHS, GEPLHS->getOperand(0), in FoldGEPICmp()
688 return FoldGEPICmp(GEPLHS, GEPRHS->getOperand(0), Cond, I); in FoldGEPICmp()
690 bool GEPsInBounds = GEPLHS->isInBounds() && GEPRHS->isInBounds(); in FoldGEPICmp()
691 if (GEPLHS->getNumOperands() == GEPRHS->getNumOperands()) { in FoldGEPICmp()
696 if (GEPLHS->getOperand(i) != GEPRHS->getOperand(i)) { in FoldGEPICmp()
697 if (GEPLHS->getOperand(i)->getType()->getPrimitiveSizeInBits() != in FoldGEPICmp()
713 Value *LHSV = GEPLHS->getOperand(DiffOperand); in FoldGEPICmp()
722 if (GEPsInBounds && (isa<ConstantExpr>(GEPLHS) || GEPLHS->hasOneUse()) && in FoldGEPICmp()
725 Value *L = EmitGEPOffset(GEPLHS); in FoldGEPICmp()