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 | ea0ea637737b70162e0dddeabdc7ebdb2f631760 (patch) | |
| tree | 50ce90da9838877775e0dac414caec33dbd73828 /lib/Bitcode | |
| parent | 6a34916fbf37318e4fc6b371115394c2791a9c80 (diff) | |
| download | llvm-ea0ea637737b70162e0dddeabdc7ebdb2f631760.tar.gz llvm-ea0ea637737b70162e0dddeabdc7ebdb2f631760.tar.bz2 llvm-ea0ea637737b70162e0dddeabdc7ebdb2f631760.tar.xz | |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
0 files changed, 0 insertions, 0 deletions
