[llvm-branch-commits] [llvm] fb46895 - [Support] Explicitly state that KnownBits::getMinValue/getMaxValue are UNSIGNED values. NFCI.
Simon Pilgrim via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Dec 24 06:14:24 PST 2020
Author: Simon Pilgrim
Date: 2020-12-24T14:10:11Z
New Revision: fb468953082c1fe97d42e6eabe8d3511bdb4054f
URL: https://github.com/llvm/llvm-project/commit/fb468953082c1fe97d42e6eabe8d3511bdb4054f
DIFF: https://github.com/llvm/llvm-project/commit/fb468953082c1fe97d42e6eabe8d3511bdb4054f.diff
LOG: [Support] Explicitly state that KnownBits::getMinValue/getMaxValue are UNSIGNED values. NFCI.
Update the comment to make this clear, following the same approach as APInt.
Added:
Modified:
llvm/include/llvm/Support/KnownBits.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Support/KnownBits.h b/llvm/include/llvm/Support/KnownBits.h
index f55839a35c13..2acaecfc3440 100644
--- a/llvm/include/llvm/Support/KnownBits.h
+++ b/llvm/include/llvm/Support/KnownBits.h
@@ -113,13 +113,13 @@ struct KnownBits {
Zero.setSignBit();
}
- /// Return the minimal value possible given these KnownBits.
+ /// Return the minimal unsigned value possible given these KnownBits.
APInt getMinValue() const {
// Assume that all bits that aren't known-ones are zeros.
return One;
}
- /// Return the maximal value possible given these KnownBits.
+ /// Return the maximal unsigned value possible given these KnownBits.
APInt getMaxValue() const {
// Assume that all bits that aren't known-zeros are ones.
return ~Zero;
More information about the llvm-branch-commits
mailing list