@@ -6251,10 +6251,11 @@ static OverflowResult mapOverflowResult(ConstantRange::OverflowResult OR) {
62516251
62526252// / Combine constant ranges from computeConstantRange() and computeKnownBits().
62536253static ConstantRange computeConstantRangeIncludingKnownBits (
6254- const Value *V, bool ForSigned, const DataLayout &DL, unsigned Depth ,
6255- AssumptionCache *AC, const Instruction *CxtI, const DominatorTree *DT,
6254+ const Value *V, bool ForSigned, const DataLayout &DL, AssumptionCache *AC ,
6255+ const Instruction *CxtI, const DominatorTree *DT,
62566256 bool UseInstrInfo = true ) {
6257- KnownBits Known = computeKnownBits (V, DL, Depth, AC, CxtI, DT, UseInstrInfo);
6257+ KnownBits Known =
6258+ computeKnownBits (V, DL, /* Depth=*/ 0 , AC, CxtI, DT, UseInstrInfo);
62586259 ConstantRange CR1 = ConstantRange::fromKnownBits (Known, ForSigned);
62596260 ConstantRange CR2 = computeConstantRange (V, ForSigned, UseInstrInfo);
62606261 ConstantRange::PreferredRangeType RangeType =
@@ -6323,9 +6324,9 @@ OverflowResult llvm::computeOverflowForUnsignedAdd(
63236324 AssumptionCache *AC, const Instruction *CxtI, const DominatorTree *DT,
63246325 bool UseInstrInfo) {
63256326 ConstantRange LHSRange = computeConstantRangeIncludingKnownBits (
6326- LHS, /* ForSigned=*/ false , DL, /* Depth= */ 0 , AC, CxtI, DT, UseInstrInfo);
6327+ LHS, /* ForSigned=*/ false , DL, AC, CxtI, DT, UseInstrInfo);
63276328 ConstantRange RHSRange = computeConstantRangeIncludingKnownBits (
6328- RHS, /* ForSigned=*/ false , DL, /* Depth= */ 0 , AC, CxtI, DT, UseInstrInfo);
6329+ RHS, /* ForSigned=*/ false , DL, AC, CxtI, DT, UseInstrInfo);
63296330 return mapOverflowResult (LHSRange.unsignedAddMayOverflow (RHSRange));
63306331}
63316332
@@ -6359,9 +6360,9 @@ static OverflowResult computeOverflowForSignedAdd(const Value *LHS,
63596360 return OverflowResult::NeverOverflows;
63606361
63616362 ConstantRange LHSRange = computeConstantRangeIncludingKnownBits (
6362- LHS, /* ForSigned=*/ true , DL, /* Depth= */ 0 , AC, CxtI, DT);
6363+ LHS, /* ForSigned=*/ true , DL, AC, CxtI, DT);
63636364 ConstantRange RHSRange = computeConstantRangeIncludingKnownBits (
6364- RHS, /* ForSigned=*/ true , DL, /* Depth= */ 0 , AC, CxtI, DT);
6365+ RHS, /* ForSigned=*/ true , DL, AC, CxtI, DT);
63656366 OverflowResult OR =
63666367 mapOverflowResult (LHSRange.signedAddMayOverflow (RHSRange));
63676368 if (OR != OverflowResult::MayOverflow)
@@ -6426,9 +6427,9 @@ OverflowResult llvm::computeOverflowForUnsignedSub(const Value *LHS,
64266427 return OverflowResult::AlwaysOverflowsLow;
64276428 }
64286429 ConstantRange LHSRange = computeConstantRangeIncludingKnownBits (
6429- LHS, /* ForSigned=*/ false , DL, /* Depth= */ 0 , AC, CxtI, DT);
6430+ LHS, /* ForSigned=*/ false , DL, AC, CxtI, DT);
64306431 ConstantRange RHSRange = computeConstantRangeIncludingKnownBits (
6431- RHS, /* ForSigned=*/ false , DL, /* Depth= */ 0 , AC, CxtI, DT);
6432+ RHS, /* ForSigned=*/ false , DL, AC, CxtI, DT);
64326433 return mapOverflowResult (LHSRange.unsignedSubMayOverflow (RHSRange));
64336434}
64346435
@@ -6458,9 +6459,9 @@ OverflowResult llvm::computeOverflowForSignedSub(const Value *LHS,
64586459 return OverflowResult::NeverOverflows;
64596460
64606461 ConstantRange LHSRange = computeConstantRangeIncludingKnownBits (
6461- LHS, /* ForSigned=*/ true , DL, /* Depth= */ 0 , AC, CxtI, DT);
6462+ LHS, /* ForSigned=*/ true , DL, AC, CxtI, DT);
64626463 ConstantRange RHSRange = computeConstantRangeIncludingKnownBits (
6463- RHS, /* ForSigned=*/ true , DL, /* Depth= */ 0 , AC, CxtI, DT);
6464+ RHS, /* ForSigned=*/ true , DL, AC, CxtI, DT);
64646465 return mapOverflowResult (LHSRange.signedSubMayOverflow (RHSRange));
64656466}
64666467
0 commit comments