diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2018-11-28 16:36:59 +0000 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2018-11-28 16:36:59 +0000 |
commit | 78a9295e150190c5a4efe345d731cb78e037d28f (patch) | |
tree | 2f696badafeeef5e5a6031d99fdabb735972600d /llvm/lib/Analysis/ValueTracking.cpp | |
parent | 085d24a8b3928cd1c4c2c15103537ae104c8841e (diff) | |
download | bcm5719-llvm-78a9295e150190c5a4efe345d731cb78e037d28f.tar.gz bcm5719-llvm-78a9295e150190c5a4efe345d731cb78e037d28f.zip |
[InstCombine] Use known overflow information for saturating add/sub
If ValueTracking can determine that the add/sub can newer overflow,
replace it with the corresponding nuw/nsw add/sub.
Additionally, for the unsigned case, if ValueTracking determines
that the add/sub always overflows, replace the result with the
saturation value.
This change is part of https://reviews.llvm.org/D54534.
llvm-svn: 347770
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
0 files changed, 0 insertions, 0 deletions