diff options
| author | Craig Topper <craig.topper@gmail.com> | 2017-04-28 21:48:09 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2017-04-28 21:48:09 +0000 |
| commit | e8dea1bc562fc949f1d9318c4b38f3a7e79ba27f (patch) | |
| tree | 13c45fd76f7c60f6d1a61518703e52dd34946983 | |
| parent | 8d01d5da78d9cd672ff0bfc431a149bc12560355 (diff) | |
| download | bcm5719-llvm-e8dea1bc562fc949f1d9318c4b38f3a7e79ba27f.tar.gz bcm5719-llvm-e8dea1bc562fc949f1d9318c4b38f3a7e79ba27f.zip | |
[ConstantRange] Use APInt::isNullValue rather than APInt::isMinValue where it would make more sense to thing of 0 as 0 rather than the minimum unsigned value. NFC
llvm-svn: 301696
| -rw-r--r-- | llvm/lib/IR/ConstantRange.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/ConstantRange.cpp b/llvm/lib/IR/ConstantRange.cpp index a58a64188c1..072a9a96635 100644 --- a/llvm/lib/IR/ConstantRange.cpp +++ b/llvm/lib/IR/ConstantRange.cpp @@ -198,7 +198,7 @@ ConstantRange::makeGuaranteedNoWrapRegion(Instruction::BinaryOps BinOp, return ConstantRange(BitWidth, false); if (auto *C = Other.getSingleElement()) - if (C->isMinValue()) + if (C->isNullValue()) // Full set: nothing signed / unsigned wraps when added to 0. return ConstantRange(BitWidth); @@ -884,7 +884,7 @@ ConstantRange::binaryOr(const ConstantRange &Other) const { // TODO: replace this with something less conservative APInt umax = APIntOps::umax(getUnsignedMin(), Other.getUnsignedMin()); - if (umax.isMinValue()) + if (umax.isNullValue()) return ConstantRange(getBitWidth(), /*isFullSet=*/true); return ConstantRange(umax, APInt::getNullValue(getBitWidth())); } |

