[ValueTracking] Explicitly specify intersection type; NFC

Preparation for D60420.

llvm-svn: 357968
This commit is contained in:
Nikita Popov 2019-04-09 07:13:03 +00:00
parent 88c70ec68e
commit 7bd7878d22
1 changed files with 5 additions and 2 deletions

View File

@ -4084,8 +4084,11 @@ static ConstantRange computeConstantRangeIncludingKnownBits(
OptimizationRemarkEmitter *ORE = nullptr, bool UseInstrInfo = true) {
KnownBits Known = computeKnownBits(
V, DL, Depth, AC, CxtI, DT, ORE, UseInstrInfo);
ConstantRange CR = computeConstantRange(V, UseInstrInfo);
return ConstantRange::fromKnownBits(Known, ForSigned).intersectWith(CR);
ConstantRange CR1 = ConstantRange::fromKnownBits(Known, ForSigned);
ConstantRange CR2 = computeConstantRange(V, UseInstrInfo);
// TODO: Use ForSigned to determine preferred range.
ConstantRange::PreferredRangeType RangeType = ConstantRange::Smallest;
return CR1.intersectWith(CR2, RangeType);
}
OverflowResult llvm::computeOverflowForUnsignedAdd(