Skip to content

Commit da57dbf

Browse files
author
Justin Lebar
committed
[ValueTracking] Clarify comments on CannotBeOrderedLessThanZero and SignBitMustBeZero.
Reviewers: hfinkel, efriedma, sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28926 llvm-svn: 292691
1 parent 474a285 commit da57dbf

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

llvm/include/llvm/Analysis/ValueTracking.h

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,25 @@ template <typename T> class ArrayRef;
167167
bool CannotBeNegativeZero(const Value *V, const TargetLibraryInfo *TLI,
168168
unsigned Depth = 0);
169169

170-
/// Return true if we can prove that the specified FP value is either a NaN or
171-
/// never less than 0.0.
172-
/// If \p IncludeNeg0 is false, -0.0 is considered less than 0.0.
170+
/// Return true if we can prove that the specified FP value is either NaN or
171+
/// never less than -0.0.
172+
///
173+
/// NaN --> true
174+
/// +0 --> true
175+
/// -0 --> true
176+
/// x > +0 --> true
177+
/// x < -0 --> false
178+
///
173179
bool CannotBeOrderedLessThanZero(const Value *V, const TargetLibraryInfo *TLI);
174180

175-
/// \returns true if we can prove that the specified FP value has a 0 sign
176-
/// bit.
181+
/// Return true if we can prove that the specified FP value's sign bit is 0.
182+
///
183+
/// NaN --> true/false (depending on the NaN's sign bit)
184+
/// +0 --> true
185+
/// -0 --> false
186+
/// x > +0 --> true
187+
/// x < -0 --> false
188+
///
177189
bool SignBitMustBeZero(const Value *V, const TargetLibraryInfo *TLI);
178190

179191
/// If the specified value can be set by repeating the same byte in memory,

0 commit comments

Comments
 (0)