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

References

lib/Transforms/InstCombine/InstCombineCompares.cpp
  860   Value *PtrBase = GEPLHS->getOperand(0);
  862   if (PtrBase == RHS && GEPLHS->isInBounds() &&
  863       !GEPLHS->getType()->isVectorTy()) {
  868     Value *Offset = evaluateGEPOffsetExpression(GEPLHS, *this, DL);
  872       Offset = EmitGEPOffset(GEPLHS);
  877   if (GEPLHS->isInBounds() && ICmpInst::isEquality(Cond) &&
  898     auto *Base = GEPLHS->getPointerOperand();
  899     if (GEPLHS->getType()->isVectorTy() && Base->getType()->isPointerTy()) {
  900       int NumElts = GEPLHS->getType()->getVectorNumElements();
  910       bool IndicesTheSame = GEPLHS->getNumOperands()==GEPRHS->getNumOperands();
  911       IndicesTheSame &= GEPLHS->getOperand(0)->getType() ==
  914         for (unsigned i = 1, e = GEPLHS->getNumOperands(); i != e; ++i)
  915           if (GEPLHS->getOperand(i) != GEPRHS->getOperand(i)) {
  921       Type *BaseType = GEPLHS->getOperand(0)->getType();
  923         return new ICmpInst(Cond, GEPLHS->getOperand(0), GEPRHS->getOperand(0));
  929       if (GEPLHS->isInBounds() && GEPRHS->isInBounds() &&
  930           (GEPLHS->hasAllConstantIndices() || GEPLHS->hasOneUse()) &&
  930           (GEPLHS->hasAllConstantIndices() || GEPLHS->hasOneUse()) &&
  934           !GEPLHS->getType()->isVectorTy()) {
  935         Value *LOffset = EmitGEPOffset(GEPLHS);
  959       return transformToIndexedCompare(GEPLHS, RHS, Cond, DL);
  964     if (!GEPLHS->getType()->isVectorTy() && GEPLHS->hasAllZeroIndices())
  964     if (!GEPLHS->getType()->isVectorTy() && GEPLHS->hasAllZeroIndices())
  965       return foldGEPICmp(GEPRHS, GEPLHS->getOperand(0),
  971       return foldGEPICmp(GEPLHS, GEPRHS->getOperand(0), Cond, I);
  973     bool GEPsInBounds = GEPLHS->isInBounds() && GEPRHS->isInBounds();
  974     if (GEPLHS->getNumOperands() == GEPRHS->getNumOperands()) {
  979         if (GEPLHS->getOperand(i) != GEPRHS->getOperand(i)) {
  980           Type *LHSType = GEPLHS->getOperand(i)->getType();
  985               (GEPLHS->getType()->isVectorTy() &&
 1001         Value *LHSV = GEPLHS->getOperand(DiffOperand);
 1010     if (GEPsInBounds && (isa<ConstantExpr>(GEPLHS) || GEPLHS->hasOneUse()) &&
 1010     if (GEPsInBounds && (isa<ConstantExpr>(GEPLHS) || GEPLHS->hasOneUse()) &&
 1013       Value *L = EmitGEPOffset(GEPLHS);
 1021   return transformToIndexedCompare(GEPLHS, RHS, Cond, DL);