summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2017-01-21 00:59:40 +0000
committerJustin Lebar <jlebar@google.com>2017-01-21 00:59:40 +0000
commitda57dbf8f7b0395a00e33889cba1564fa3d85d3b (patch)
tree9755d201a824738891f062cde9b26c7ffab11dd3
parent474a28563f0259803a34cb23205005e801267f84 (diff)
downloadbcm5719-llvm-da57dbf8f7b0395a00e33889cba1564fa3d85d3b.tar.gz
bcm5719-llvm-da57dbf8f7b0395a00e33889cba1564fa3d85d3b.zip
[ValueTracking] Clarify comments on CannotBeOrderedLessThanZero and SignBitMustBeZero.
Reviewers: hfinkel, efriedma, sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28926 llvm-svn: 292691
-rw-r--r--llvm/include/llvm/Analysis/ValueTracking.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/llvm/include/llvm/Analysis/ValueTracking.h b/llvm/include/llvm/Analysis/ValueTracking.h
index aaf6f888e06..5121c8b0c17 100644
--- a/llvm/include/llvm/Analysis/ValueTracking.h
+++ b/llvm/include/llvm/Analysis/ValueTracking.h
@@ -167,13 +167,25 @@ template <typename T> class ArrayRef;
bool CannotBeNegativeZero(const Value *V, const TargetLibraryInfo *TLI,
unsigned Depth = 0);
- /// Return true if we can prove that the specified FP value is either a NaN or
- /// never less than 0.0.
- /// If \p IncludeNeg0 is false, -0.0 is considered less than 0.0.
+ /// Return true if we can prove that the specified FP value is either NaN or
+ /// never less than -0.0.
+ ///
+ /// NaN --> true
+ /// +0 --> true
+ /// -0 --> true
+ /// x > +0 --> true
+ /// x < -0 --> false
+ ///
bool CannotBeOrderedLessThanZero(const Value *V, const TargetLibraryInfo *TLI);
- /// \returns true if we can prove that the specified FP value has a 0 sign
- /// bit.
+ /// Return true if we can prove that the specified FP value's sign bit is 0.
+ ///
+ /// NaN --> true/false (depending on the NaN's sign bit)
+ /// +0 --> true
+ /// -0 --> false
+ /// x > +0 --> true
+ /// x < -0 --> false
+ ///
bool SignBitMustBeZero(const Value *V, const TargetLibraryInfo *TLI);
/// If the specified value can be set by repeating the same byte in memory,
OpenPOWER on IntegriCloud