| commit | 549f4f25103c70c7b796e56fe28324ca5ad904b6 | [log] [tgz] |
|---|---|---|
| author | David Majnemer <david.majnemer@gmail.com> | Sat Nov 01 09:09:51 2014 +0000 |
| committer | David Majnemer <david.majnemer@gmail.com> | Sat Nov 01 09:09:51 2014 +0000 |
| tree | b533cf71c1c01df9e51d1721ff1c8ae10743e34e | |
| parent | c758df4053767b19709a3345eb22f73f8894931b [diff] |
InstCombine: Combine (X+cst) < 0 --> X < -cst This can happen pretty often in code that looks like: int foo = bar - 1; if (foo < 0) do stuff In this case, bar < 1 is an equivalent condition. This transform requires that the add instruction be annotated with nsw. llvm-svn: 221045