forked from OSchip/llvm-project
[ConstantRange] improve my previous patch per Nick suggestion
llvm-svn: 193795
This commit is contained in:
parent
1c09d4a537
commit
14d4b0cdb2
|
@ -447,7 +447,7 @@ ConstantRange ConstantRange::signExtend(uint32_t DstTySize) const {
|
|||
assert(SrcTySize < DstTySize && "Not a value extension");
|
||||
|
||||
// special case: [X, INT_MIN) -- not really wrapping around
|
||||
if (Upper == APInt::getHighBitsSet(SrcTySize, 1))
|
||||
if (Upper.isMinSignedValue())
|
||||
return ConstantRange(Lower.sext(DstTySize), Upper.zext(DstTySize));
|
||||
|
||||
if (isFullSet() || isSignWrappedSet()) {
|
||||
|
|
Loading…
Reference in New Issue