mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-03 15:26:18 +00:00
Fix the implementation of ConstantRange::sub(ConstantRange). Patch by Xi Wang!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133648 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -529,8 +529,8 @@ ConstantRange::sub(const ConstantRange &Other) const {
|
||||
return ConstantRange(getBitWidth(), /*isFullSet=*/true);
|
||||
|
||||
APInt Spread_X = getSetSize(), Spread_Y = Other.getSetSize();
|
||||
APInt NewLower = getLower() - Other.getLower();
|
||||
APInt NewUpper = getUpper() - Other.getUpper() + 1;
|
||||
APInt NewLower = getLower() - Other.getUpper() + 1;
|
||||
APInt NewUpper = getUpper() - Other.getLower();
|
||||
if (NewLower == NewUpper)
|
||||
return ConstantRange(getBitWidth(), /*isFullSet=*/true);
|
||||
|
||||
|
Reference in New Issue
Block a user