Skip to content

Commit 6902ceb

Browse files
committed
!fixup clarify user needs t manauge AllKnownNonNegative and NonZero.
1 parent 244ba33 commit 6902ceb

File tree

1 file changed

+6
-3
lines changed
  • llvm/include/llvm/Transforms/Utils

1 file changed

+6
-3
lines changed

llvm/include/llvm/Transforms/Utils/Local.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,11 +563,14 @@ bool inferAttributesFromOthers(Function &F);
563563
struct OverflowTracking {
564564
bool HasNUW = true;
565565
bool HasNSW = true;
566+
567+
// Note: At the moment, users are responsible to manage AllKnownNonNegative
568+
// and AllKnownNonZero manually. AllKnownNonNegative can be true in a case
569+
// where one of the operands is negative, but one the operators is not NSW.
570+
// AllKnownNonNegative should not be used independently of HasNSW
566571
bool AllKnownNonNegative = true;
567572
bool AllKnownNonZero = true;
568-
// Note: AllKnownNonNegative can be true in a case where one of the operands
569-
// is negative, but one the operators is not NSW. AllKnownNonNegative should
570-
// not be used independently of HasNSW
573+
571574
OverflowTracking() = default;
572575

573576
/// Merge in the no-wrap flags from \p I.

0 commit comments

Comments
 (0)