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