summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/SimplifyCFG/switch-on-const-select.ll
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-04 15:39:14 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-04 15:39:14 +0000
commit04c225862491b656b3804bf54d17e7c291a129e3 (patch)
treedb372e2d98b8b08d7a1a8b8137e6582385054963 /llvm/test/Transforms/SimplifyCFG/switch-on-const-select.ll
parent99a1f2e95bbc60349ac0296be2565158fe14f84a (diff)
downloadbcm5719-llvm-04c225862491b656b3804bf54d17e7c291a129e3.tar.gz
bcm5719-llvm-04c225862491b656b3804bf54d17e7c291a129e3.zip
InstCombine: Improvement to check if signed addition overflows.
This patch implements two things: 1. If we know one number is positive and another is negative, we return true as signed addition of two opposite signed numbers will never overflow. 2. Implemented TODO : If one of the operands only has one non-zero bit, and if the other operand has a known-zero bit in a more significant place than it (not including the sign bit) the ripple may go up to and fill the zero, but won't change the sign. e.x - (x & ~4) + 1 We make sure that we are ignoring 0 at MSB. Patch by Suyog Sarda. llvm-svn: 210186
Diffstat (limited to 'llvm/test/Transforms/SimplifyCFG/switch-on-const-select.ll')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud