diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-11-20 17:20:26 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-11-20 17:20:26 +0000 |
commit | eea21da12a16d6f81a9cf213c988ab058c6b2722 (patch) | |
tree | 471f982deff00dd4dd45d5eda8fe41ef9f14cf56 /llvm/lib/Analysis/DominanceFrontier.cpp | |
parent | 06a9b5a30557698f8eccc920533a5432a56ee8db (diff) | |
download | bcm5719-llvm-eea21da12a16d6f81a9cf213c988ab058c6b2722.tar.gz bcm5719-llvm-eea21da12a16d6f81a9cf213c988ab058c6b2722.zip |
[InstructionSimplify] Add support for saturating add/sub
Add support for saturating add/sub in InstructionSimplify. In particular, the following simplifications are supported:
sat(X + 0) -> X
sat(X + undef) -> -1
sat(X uadd MAX) -> MAX
(and commutative variants)
sat(X - 0) -> X
sat(X - X) -> 0
sat(X - undef) -> 0
sat(undef - X) -> 0
sat(0 usub X) -> 0
sat(X usub MAX) -> 0
Patch by: @nikic (Nikita Popov)
Differential Revision: https://reviews.llvm.org/D54532
llvm-svn: 347330
Diffstat (limited to 'llvm/lib/Analysis/DominanceFrontier.cpp')
0 files changed, 0 insertions, 0 deletions