In order to fold an always overflowing signed saturating add/sub, we need to know in which direction the always overflow occurs. This patch splits up AlwaysOverflows into AlwaysOverflowsLow and AlwaysOverflowsHigh to pass through this information (but it is not used yet).
Details
Diff Detail
Event Timeline
llvm/include/llvm/Analysis/ValueTracking.h | ||
---|---|---|
416 | These now need a comment for each. |
llvm/include/llvm/Analysis/ValueTracking.h | ||
---|---|---|
416 | Yeah, this is the direction of overflow. For AlwaysOverflowLow the real result would be lower than signed/unsigned min, for AlwaysOverflowHigh it would be higher than signed/unsigned max. |
llvm/lib/IR/ConstantRange.cpp | ||
---|---|---|
1211 | What do you mean by this comment? The unsigned add is an overflow high case. |
These now need a comment for each.
While with the enum on the LHS of the diff it is obvious,
here i'm not sure what low/high means.
The direction of the overflow?