Skip to content

Commit 7bd7878

Browse files
committedApr 9, 2019
[ValueTracking] Explicitly specify intersection type; NFC
Preparation for D60420. llvm-svn: 357968
1 parent 88c70ec commit 7bd7878

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎llvm/lib/Analysis/ValueTracking.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -4084,8 +4084,11 @@ static ConstantRange computeConstantRangeIncludingKnownBits(
40844084
OptimizationRemarkEmitter *ORE = nullptr, bool UseInstrInfo = true) {
40854085
KnownBits Known = computeKnownBits(
40864086
V, DL, Depth, AC, CxtI, DT, ORE, UseInstrInfo);
4087-
ConstantRange CR = computeConstantRange(V, UseInstrInfo);
4088-
return ConstantRange::fromKnownBits(Known, ForSigned).intersectWith(CR);
4087+
ConstantRange CR1 = ConstantRange::fromKnownBits(Known, ForSigned);
4088+
ConstantRange CR2 = computeConstantRange(V, UseInstrInfo);
4089+
// TODO: Use ForSigned to determine preferred range.
4090+
ConstantRange::PreferredRangeType RangeType = ConstantRange::Smallest;
4091+
return CR1.intersectWith(CR2, RangeType);
40894092
}
40904093

40914094
OverflowResult llvm::computeOverflowForUnsignedAdd(

0 commit comments

Comments
 (0)