[InstSimplify] add nuw %x, C2 must be at least C2
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 20 Aug 2015 23:01:41 +0000 (23:01 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 20 Aug 2015 23:01:41 +0000 (23:01 +0000)
commitbdab9f9f82592215428e7991cc8713756ee39fd4
tree19978d69eccf4430556ace06033b564771c2d626
parentb4fce5a1c18a40ff89a6503afe8fe0b53e14591a
[InstSimplify] add nuw %x, C2 must be at least C2

Use the fact that add nuw always creates a larger bit pattern when
trying to simplify comparisons.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245638 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
test/Transforms/InstSimplify/compare.ll