DescriptionPNaCl: Extend ExpandMulWithOverflow pass to handle uadd.with.overflow too
It turned out that umul.with.overflow wasn't the only *.with.overflow
intrinsic usage introduced by Clang.
I knew that Clang's CGExprCXX.cpp generates umul.with.overflow for an
overflow check for C++'s "new Foo[]". The same code for handling "new
Foo[]" also generates uadd.with.overflow in some cases. This happens
if class Foo has a destructor or a delete[] operator that takes a size
argument. In those cases, the C++ ABI adds a "cookie" to the
allocation which contains the array's size.
Rename the pass to "ExpandArithWithOverflow" and rename files
accordingly.
Also enable the pass.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3434
TEST=*.ll tests + trybots + GCC torture tests
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-llvm.git;a=commit;h=9a6f5fa
Patch Set 1 #
Total comments: 4
Patch Set 2 : Fix #Patch Set 3 : Rebase #
Messages
Total messages: 6 (0 generated)
|