• Home
  • Raw
  • Download

Lines Matching refs:CR

55                                                    const ConstantRange &CR) {  in makeAllowedICmpRegion()  argument
56 if (CR.isEmptySet()) in makeAllowedICmpRegion()
57 return CR; in makeAllowedICmpRegion()
59 uint32_t W = CR.getBitWidth(); in makeAllowedICmpRegion()
64 return CR; in makeAllowedICmpRegion()
66 if (CR.isSingleElement()) in makeAllowedICmpRegion()
67 return ConstantRange(CR.getUpper(), CR.getLower()); in makeAllowedICmpRegion()
70 APInt UMax(CR.getUnsignedMax()); in makeAllowedICmpRegion()
76 APInt SMax(CR.getSignedMax()); in makeAllowedICmpRegion()
82 APInt UMax(CR.getUnsignedMax()); in makeAllowedICmpRegion()
88 APInt SMax(CR.getSignedMax()); in makeAllowedICmpRegion()
94 APInt UMin(CR.getUnsignedMin()); in makeAllowedICmpRegion()
100 APInt SMin(CR.getSignedMin()); in makeAllowedICmpRegion()
106 APInt UMin(CR.getUnsignedMin()); in makeAllowedICmpRegion()
112 APInt SMin(CR.getSignedMin()); in makeAllowedICmpRegion()
121 const ConstantRange &CR) { in makeSatisfyingICmpRegion() argument
126 return makeAllowedICmpRegion(CmpInst::getInversePredicate(Pred), CR) in makeSatisfyingICmpRegion()
362 ConstantRange ConstantRange::difference(const ConstantRange &CR) const { in difference()
363 return intersectWith(CR.inverse()); in difference()
371 ConstantRange ConstantRange::intersectWith(const ConstantRange &CR) const { in intersectWith()
372 assert(getBitWidth() == CR.getBitWidth() && in intersectWith()
376 if ( isEmptySet() || CR.isFullSet()) return *this; in intersectWith()
377 if (CR.isEmptySet() || isFullSet()) return CR; in intersectWith()
379 if (!isWrappedSet() && CR.isWrappedSet()) in intersectWith()
380 return CR.intersectWith(*this); in intersectWith()
382 if (!isWrappedSet() && !CR.isWrappedSet()) { in intersectWith()
383 if (Lower.ult(CR.Lower)) { in intersectWith()
384 if (Upper.ule(CR.Lower)) in intersectWith()
387 if (Upper.ult(CR.Upper)) in intersectWith()
388 return ConstantRange(CR.Lower, Upper); in intersectWith()
390 return CR; in intersectWith()
392 if (Upper.ult(CR.Upper)) in intersectWith()
395 if (Lower.ult(CR.Upper)) in intersectWith()
396 return ConstantRange(Lower, CR.Upper); in intersectWith()
401 if (isWrappedSet() && !CR.isWrappedSet()) { in intersectWith()
402 if (CR.Lower.ult(Upper)) { in intersectWith()
403 if (CR.Upper.ult(Upper)) in intersectWith()
404 return CR; in intersectWith()
406 if (CR.Upper.ule(Lower)) in intersectWith()
407 return ConstantRange(CR.Lower, Upper); in intersectWith()
409 if (getSetSize().ult(CR.getSetSize())) in intersectWith()
411 return CR; in intersectWith()
413 if (CR.Lower.ult(Lower)) { in intersectWith()
414 if (CR.Upper.ule(Lower)) in intersectWith()
417 return ConstantRange(Lower, CR.Upper); in intersectWith()
419 return CR; in intersectWith()
422 if (CR.Upper.ult(Upper)) { in intersectWith()
423 if (CR.Lower.ult(Upper)) { in intersectWith()
424 if (getSetSize().ult(CR.getSetSize())) in intersectWith()
426 return CR; in intersectWith()
429 if (CR.Lower.ult(Lower)) in intersectWith()
430 return ConstantRange(Lower, CR.Upper); in intersectWith()
432 return CR; in intersectWith()
434 if (CR.Upper.ule(Lower)) { in intersectWith()
435 if (CR.Lower.ult(Lower)) in intersectWith()
438 return ConstantRange(CR.Lower, Upper); in intersectWith()
440 if (getSetSize().ult(CR.getSetSize())) in intersectWith()
442 return CR; in intersectWith()
452 ConstantRange ConstantRange::unionWith(const ConstantRange &CR) const { in unionWith()
453 assert(getBitWidth() == CR.getBitWidth() && in unionWith()
456 if ( isFullSet() || CR.isEmptySet()) return *this; in unionWith()
457 if (CR.isFullSet() || isEmptySet()) return CR; in unionWith()
459 if (!isWrappedSet() && CR.isWrappedSet()) return CR.unionWith(*this); in unionWith()
461 if (!isWrappedSet() && !CR.isWrappedSet()) { in unionWith()
462 if (CR.Upper.ult(Lower) || Upper.ult(CR.Lower)) { in unionWith()
464 APInt d1 = CR.Lower - Upper, d2 = Lower - CR.Upper; in unionWith()
466 return ConstantRange(Lower, CR.Upper); in unionWith()
467 return ConstantRange(CR.Lower, Upper); in unionWith()
471 if (CR.Lower.ult(L)) in unionWith()
472 L = CR.Lower; in unionWith()
473 if ((CR.Upper - 1).ugt(U - 1)) in unionWith()
474 U = CR.Upper; in unionWith()
482 if (!CR.isWrappedSet()) { in unionWith()
485 if (CR.Upper.ule(Upper) || CR.Lower.uge(Lower)) in unionWith()
490 if (CR.Lower.ule(Upper) && Lower.ule(CR.Upper)) in unionWith()
496 if (Upper.ule(CR.Lower) && CR.Upper.ule(Lower)) { in unionWith()
497 APInt d1 = CR.Lower - Upper, d2 = Lower - CR.Upper; in unionWith()
499 return ConstantRange(Lower, CR.Upper); in unionWith()
500 return ConstantRange(CR.Lower, Upper); in unionWith()
505 if (Upper.ult(CR.Lower) && Lower.ult(CR.Upper)) in unionWith()
506 return ConstantRange(CR.Lower, Upper); in unionWith()
510 assert(CR.Lower.ult(Upper) && CR.Upper.ult(Lower) && in unionWith()
512 return ConstantRange(Lower, CR.Upper); in unionWith()
517 if (CR.Lower.ule(Upper) || Lower.ule(CR.Upper)) in unionWith()
521 if (CR.Upper.ugt(U)) in unionWith()
522 U = CR.Upper; in unionWith()
523 if (CR.Lower.ult(L)) in unionWith()
524 L = CR.Lower; in unionWith()