Result of analyzing whether an arithmetic operation can overflow.
Declared in <llvm/Analysis/ValueTracking.h>
enum class OverflowResult : int;
| Name | Description |
|---|---|
AlwaysOverflowsLow | Always overflows in the direction of signed/unsigned min value. |
AlwaysOverflowsHigh | Always overflows in the direction of signed/unsigned max value. |
MayOverflow | May or may not overflow. |
NeverOverflows | Never overflows. |
| Name | Description |
|---|---|
computeOverflowForSignedAdd | This version also leverages the sign bit of Add if known. |
computeOverflowForSignedAdd | Compute whether a signed add of LHS and RHS can overflow. |
computeOverflowForSignedMul | Compute whether a signed multiply of LHS and RHS can overflow. |
computeOverflowForSignedSub | Compute whether a signed subtract of LHS and RHS can overflow. |
computeOverflowForUnsignedAdd | Compute whether an unsigned add of LHS and RHS can overflow. |
computeOverflowForUnsignedMul | Compute whether an unsigned multiply of LHS and RHS can overflow. |
computeOverflowForUnsignedSub | Compute whether an unsigned subtract of LHS and RHS can overflow. |