Lines Matching refs:ConstantRange
127 ConstantRange Range = in intersect()
416 std::optional<ConstantRange> getRangeFor(Value *V, Instruction *CxtI,
420 std::function<ConstantRange(const ConstantRange &, const ConstantRange &)>
599 if (std::optional<ConstantRange> Range = cast<CallBase>(BBI)->getRange()) in getFromRangeMetadata()
723 if (std::optional<ConstantRange> Range = cast<Argument>(Val)->getRange()) in solveBlockValueNonLocal()
860 const ConstantRange &TrueCR = TrueVal.asConstantRange(SI->getType()); in solveBlockValueSelect()
861 const ConstantRange &FalseCR = FalseVal.asConstantRange(SI->getType()); in solveBlockValueSelect()
870 ConstantRange ResultCR = [&]() { in solveBlockValueSelect()
899 ConstantRange Zero(APInt::getZero(TrueCR.getBitWidth())); in solveBlockValueSelect()
931 std::optional<ConstantRange>
959 std::optional<ConstantRange> LHSRes = getRangeFor(CI->getOperand(0), CI, BB); in solveBlockValueCast()
963 const ConstantRange &LHSRange = *LHSRes; in solveBlockValueCast()
977 std::function<ConstantRange(const ConstantRange &, const ConstantRange &)> in solveBlockValueBinaryOpImpl() argument
983 std::optional<ConstantRange> LHSRes = getRangeFor(I->getOperand(0), I, BB); in solveBlockValueBinaryOpImpl()
987 std::optional<ConstantRange> RHSRes = getRangeFor(I->getOperand(1), I, BB); in solveBlockValueBinaryOpImpl()
991 const ConstantRange &LHSRange = *LHSRes; in solveBlockValueBinaryOpImpl()
992 const ConstantRange &RHSRange = *RHSRes; in solveBlockValueBinaryOpImpl()
1004 [BO, NoWrapKind](const ConstantRange &CR1, const ConstantRange &CR2) { in solveBlockValueBinaryOp()
1010 BO, BB, [BO](const ConstantRange &CR1, const ConstantRange &CR2) { in solveBlockValueBinaryOp()
1019 WO, BB, [WO](const ConstantRange &CR1, const ConstantRange &CR2) { in solveBlockValueOverflowIntrinsic()
1027 if (!ConstantRange::isIntrinsicSupported(II->getIntrinsicID())) { in solveBlockValueIntrinsic()
1033 SmallVector<ConstantRange, 2> OpRanges; in solveBlockValueIntrinsic()
1035 std::optional<ConstantRange> Range = getRangeFor(Op, II, BB); in solveBlockValueIntrinsic()
1041 return intersect(ValueLatticeElement::getRange(ConstantRange::intrinsic( in solveBlockValueIntrinsic()
1123 ConstantRange RHSRange(RHS->getType()->getScalarSizeInBits(), in getValueFromSimpleICmpCondition()
1126 RHSRange = ConstantRange(CI->getValue()); in getValueFromSimpleICmpCondition()
1135 ConstantRange TrueValues = in getValueFromSimpleICmpCondition()
1136 ConstantRange::makeAllowedICmpRegion(Pred, RHSRange); in getValueFromSimpleICmpCondition()
1140 static std::optional<ConstantRange>
1142 function_ref<std::optional<ConstantRange>(const APInt &)> Fn) { in getRangeViaSLT()
1203 ConstantRange::fromKnownBits(Known, /*IsSigned*/ false)); in getValueFromICmpCondition()
1208 ConstantRange::makeMaskNotEqualRange(*Mask, *C)); in getValueFromICmpCondition()
1218 ConstantRange CR = ConstantRange::makeExactICmpRegion(EdgePred, *C); in getValueFromICmpCondition()
1220 return ValueLatticeElement::getRange(ConstantRange::getNonEmpty( in getValueFromICmpCondition()
1232 EdgePred, *C, [&](const APInt &RHS) -> std::optional<ConstantRange> { in getValueFromICmpCondition()
1236 return ConstantRange::getNonEmpty( in getValueFromICmpCondition()
1258 ConstantRange NWR = ConstantRange::makeExactNoWrapRegion( in getValueFromOverflowCondition()
1345 return ValueLatticeElement::getRange(ConstantRange(C->getValue())); in constantFoldUser()
1356 return ValueLatticeElement::getRange(ConstantRange(C->getValue())); in constantFoldUser()
1360 return ValueLatticeElement::getRange(ConstantRange(OpConstVal)); in constantFoldUser()
1461 ConstantRange EdgesVals(BitWidth, DefaultCase/*isFullSet*/); in getEdgeValueLocal()
1465 ConstantRange EdgeVal(CaseValue); in getEdgeValueLocal()
1735 const ConstantRange &CR = Result.getConstantRange(); in getConstant()
1742 ConstantRange LazyValueInfo::getConstantRange(Value *V, Instruction *CxtI, in getConstantRange()
1750 ConstantRange LazyValueInfo::getConstantRangeAtUse(const Use &U, in getConstantRangeAtUse()
1770 const ConstantRange &CR = Result.getConstantRange(); in getConstantOnEdge()
1777 ConstantRange LazyValueInfo::getConstantRangeOnEdge(Value *V, in getConstantRangeOnEdge()
1797 const ConstantRange &CR = Val.getConstantRange(); in getPredicateResult()
1798 ConstantRange RHS = C->toConstantRange(); in getPredicateResult()