llvm-6502/lib/Transforms/InstCombine
Serge Pavlov ea0ea63773 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
2014-04-13 18:23:41 +00:00
..
CMakeLists.txt
InstCombine.h Fix shift by constants for vector. 2014-04-11 17:57:53 +00:00
InstCombineAddSub.cpp [Modules] Move the LLVM IR pattern match header into the IR library, it 2014-03-04 11:08:18 +00:00
InstCombineAndOrXor.cpp [Modules] Move the ConstantRange class into the IR library. This is 2014-03-04 12:24:34 +00:00
InstCombineCalls.cpp ARM64: initial backend import 2014-03-29 10:18:08 +00:00
InstCombineCasts.cpp [C++11] Add range based accessors for the Use-Def chain of a Value. 2014-03-09 03:16:01 +00:00
InstCombineCompares.cpp Recognize test for overflow in integer multiplication. 2014-04-13 18:23:41 +00:00
InstCombineLoadStoreAlloca.cpp [InstCombine] Don't fold bitcast into store if it would need addrspacecast 2014-03-25 17:21:41 +00:00
InstCombineMulDivRem.cpp [Modules] Move the LLVM IR pattern match header into the IR library, it 2014-03-04 11:08:18 +00:00
InstCombinePHI.cpp [C++11] Add range based accessors for the Use-Def chain of a Value. 2014-03-09 03:16:01 +00:00
InstCombineSelect.cpp [Modules] Move the LLVM IR pattern match header into the IR library, it 2014-03-04 11:08:18 +00:00
InstCombineShifts.cpp Fix shift by constants for vector. 2014-04-11 17:57:53 +00:00
InstCombineSimplifyDemanded.cpp [Modules] Move the LLVM IR pattern match header into the IR library, it 2014-03-04 11:08:18 +00:00
InstCombineVectorOps.cpp [C++11] Add range based accessors for the Use-Def chain of a Value. 2014-03-09 03:16:01 +00:00
InstCombineWorklist.h [C++11] Add range based accessors for the Use-Def chain of a Value. 2014-03-09 03:16:01 +00:00
InstructionCombining.cpp Fix PR19270 - type mismatch caused by invalid optimization. 2014-04-03 17:51:58 +00:00
LLVMBuild.txt
Makefile