diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-28 18:04:20 +0000 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-02-28 18:04:20 +0000 |
commit | af2b0bef4361e8308697022f55209199190f08a3 (patch) | |
tree | 66f859ef2698c06846dbb9d0a788008934e1ba60 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | ab10947b345e7b97c194dc33a36cce5043e7cd5f (diff) | |
download | llvm-af2b0bef4361e8308697022f55209199190f08a3.zip llvm-af2b0bef4361e8308697022f55209199190f08a3.tar.gz llvm-af2b0bef4361e8308697022f55209199190f08a3.tar.bz2 |
[ValueTracking] More accurate unsigned sub overflow detection
Second part of D58593.
Compute precise overflow conditions based on all known bits, rather
than just the sign bits. Unsigned a - b overflows iff a < b, and we
can determine whether this always/never happens based on the minimal
and maximal values achievable for a and b subject to the known bits
constraint.
llvm-svn: 355109
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions