diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-03-10 18:40:14 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-03-10 18:40:14 +0000 |
commit | 6b96fe7e146f7eb594e67210c6bef511ad0a2058 (patch) | |
tree | e45377cac2b691fd66dff4e8cb4f59c7f2193ba5 /utils/TableGen | |
parent | f7fdad15d910fc27bc9334faab5b71c101455e1a (diff) | |
download | external_llvm-6b96fe7e146f7eb594e67210c6bef511ad0a2058.zip external_llvm-6b96fe7e146f7eb594e67210c6bef511ad0a2058.tar.gz external_llvm-6b96fe7e146f7eb594e67210c6bef511ad0a2058.tar.bz2 |
InstCombine: Turn umul_with_overflow into mul nuw if we can prove that it cannot overflow.
This happens a lot in clang-compiled C++ code because it adds overflow checks to operator new[]:
unsigned *foo(unsigned n) { return new unsigned[n]; }
We can optimize away the overflow check on 64 bit targets because (uint64_t)n*4 cannot overflow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127418 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
0 files changed, 0 insertions, 0 deletions