summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2018-11-28 16:36:59 +0000
committerNikita Popov <nikita.ppv@gmail.com>2018-11-28 16:36:59 +0000
commit78a9295e150190c5a4efe345d731cb78e037d28f (patch)
tree2f696badafeeef5e5a6031d99fdabb735972600d /llvm/lib/Analysis/ValueTracking.cpp
parent085d24a8b3928cd1c4c2c15103537ae104c8841e (diff)
downloadbcm5719-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
OpenPOWER on IntegriCloud