diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-21 04:04:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-21 04:04:05 +0000 |
commit | ffbd02829c7beaee158cefa431a0052683caf4fa (patch) | |
tree | 0fcf8c9f42206347b7f11c4afda18b77a30e5b10 /llvm/lib/Transforms/Utils/LoopSimplify.cpp | |
parent | 900ce231f9bd32885a3ed18a2cfec81d851a12a7 (diff) | |
download | llvm-ffbd02829c7beaee158cefa431a0052683caf4fa.zip llvm-ffbd02829c7beaee158cefa431a0052683caf4fa.tar.gz llvm-ffbd02829c7beaee158cefa431a0052683caf4fa.tar.bz2 |
enhance x-(-A) -> x+A to preserve NUW/NSW.
Use the presence of NSW/NUW to fold "icmp (x+cst), x" to a constant in
cases where it would otherwise be undefined behavior.
Surprisingly (to me at least), this triggers hundreds of the times in
a few benchmarks: lencode, ldecode, and 466.h264ref seem to *really*
like this.
llvm-svn: 91812
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopSimplify.cpp')
0 files changed, 0 insertions, 0 deletions