enum SCEVWrapPredicate::IncrementWrapFlags

Description

Similar to SCEV::NoWrapFlags, but with slightly different semantics for FlagNUSW. The increment is considered to be signed, and a + b (where b is the increment) is considered to wrap if: zext(a + b) != zext(a) + sext(b) If Signed is a function that takes an n-bit tuple and maps to the integer domain as the tuples value interpreted as twos complement, and Unsigned a function that takes an n-bit tuple and maps to the integer domain as as the base two value of input tuple, then a + b has IncrementNUSW iff: 0 < = Unsigned(a) + Signed(b) < 2^n The IncrementNSSW flag has identical semantics with SCEV::FlagNSW. Note that the IncrementNUSW flag is not commutative: if base + inc has IncrementNUSW, then inc + base doesn't neccessarily have this property. The reason for this is that this is used for sign/zero extending affine AddRec SCEV expressions when a SCEVWrapPredicate is assumed. A {base,+,inc} expression is already non-commutative with regards to base and inc, since it is interpreted as: (((base + inc) + inc) + inc) ...

Declared at: llvm/include/llvm/Analysis/ScalarEvolution.h:326

Enumerators

NameValueComment
IncrementAnyWrap0
IncrementNUSW1
IncrementNSSW2
IncrementNoWrapMask3