Lines Matching refs:EndPoints
427 static bool tryMergeRange(SmallVectorImpl<Value *> &EndPoints, ConstantInt *Low, in tryMergeRange() argument
430 unsigned Size = EndPoints.size(); in tryMergeRange()
431 APInt LB = cast<ConstantInt>(EndPoints[Size - 2])->getValue(); in tryMergeRange()
432 APInt LE = cast<ConstantInt>(EndPoints[Size - 1])->getValue(); in tryMergeRange()
437 EndPoints[Size - 2] = ConstantInt::get(Ty, Union.getLower()); in tryMergeRange()
438 EndPoints[Size - 1] = ConstantInt::get(Ty, Union.getUpper()); in tryMergeRange()
444 static void addRange(SmallVectorImpl<Value *> &EndPoints, ConstantInt *Low, in addRange() argument
446 if (!EndPoints.empty()) in addRange()
447 if (tryMergeRange(EndPoints, Low, High)) in addRange()
450 EndPoints.push_back(Low); in addRange()
451 EndPoints.push_back(High); in addRange()
467 SmallVector<Value*, 4> EndPoints; in getMostGenericRange() local
477 addRange(EndPoints, ALow, cast<ConstantInt>(A->getOperand(2 * AI + 1))); in getMostGenericRange()
480 addRange(EndPoints, BLow, cast<ConstantInt>(B->getOperand(2 * BI + 1))); in getMostGenericRange()
485 addRange(EndPoints, cast<ConstantInt>(A->getOperand(2 * AI)), in getMostGenericRange()
490 addRange(EndPoints, cast<ConstantInt>(B->getOperand(2 * BI)), in getMostGenericRange()
497 unsigned Size = EndPoints.size(); in getMostGenericRange()
499 ConstantInt *FB = cast<ConstantInt>(EndPoints[0]); in getMostGenericRange()
500 ConstantInt *FE = cast<ConstantInt>(EndPoints[1]); in getMostGenericRange()
501 if (tryMergeRange(EndPoints, FB, FE)) { in getMostGenericRange()
503 EndPoints[i] = EndPoints[i + 2]; in getMostGenericRange()
505 EndPoints.resize(Size - 2); in getMostGenericRange()
511 if (EndPoints.size() == 2) { in getMostGenericRange()
512 ConstantRange Range(cast<ConstantInt>(EndPoints[0])->getValue(), in getMostGenericRange()
513 cast<ConstantInt>(EndPoints[1])->getValue()); in getMostGenericRange()
518 return MDNode::get(A->getContext(), EndPoints); in getMostGenericRange()