diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2014-04-13 18:23:41 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2014-04-13 18:23:41 +0000 |
commit | 4bb54d51c86e4a3aaf7bf502e7a76eaef4435e23 (patch) | |
tree | 4d4f917a56feda3055eb05886ebce4ddacca91b6 /llvm/lib/CodeGen/LiveVariables.cpp | |
parent | d9963c75dafbcd159206c7028264f8924c290ece (diff) | |
download | bcm5719-llvm-4bb54d51c86e4a3aaf7bf502e7a76eaef4435e23.tar.gz bcm5719-llvm-4bb54d51c86e4a3aaf7bf502e7a76eaef4435e23.zip |
Recognize test for overflow in integer multiplication.
If multiplication involves zero-extended arguments and the result is
compared as in the patterns:
%mul32 = trunc i64 %mul64 to i32
%zext = zext i32 %mul32 to i64
%overflow = icmp ne i64 %mul64, %zext
or
%overflow = icmp ugt i64 %mul64 , 0xffffffff
then the multiplication may be replaced by call to umul.with.overflow.
This change fixes PR4917 and PR4918.
Differential Revision: http://llvm-reviews.chandlerc.com/D2814
llvm-svn: 206137
Diffstat (limited to 'llvm/lib/CodeGen/LiveVariables.cpp')
0 files changed, 0 insertions, 0 deletions