1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-27 14:02:50 +01:00
llvm-mirror/lib/Transforms/InstCombine
Rafael Espindola 4518a1dc81 InstCombine: Improvement to check if signed addition overflows.
This patch implements two things:

1. If we know one number is positive and another is negative, we return true as
    signed addition of two opposite signed numbers will never overflow.

2. Implemented TODO : If one of the operands only has one non-zero bit, and if
    the other operand has a known-zero bit in a more significant place than it
    (not including the sign bit) the ripple may go up to and fill the zero, but
    won't change the sign. e.x -  (x & ~4) + 1

We make sure that we are ignoring 0 at MSB.

Patch by Suyog Sarda.

llvm-svn: 210186
2014-06-04 15:39:14 +00:00
..
CMakeLists.txt Tidy up a bit. No functional change. 2013-04-05 21:20:12 +00:00
InstCombine.h Rename ComputeMaskedBits to computeKnownBits. "Masked" has been 2014-05-14 21:14:37 +00:00
InstCombineAddSub.cpp InstCombine: Improvement to check if signed addition overflows. 2014-06-04 15:39:14 +00:00
InstCombineAndOrXor.cpp Reorder shuffle and binary operation. 2014-05-11 08:46:12 +00:00
InstCombineCalls.cpp Post-commit fixes for r209643 2014-05-27 16:54:33 +00:00
InstCombineCasts.cpp Rename ComputeMaskedBits to computeKnownBits. "Masked" has been 2014-05-14 21:14:37 +00:00
InstCombineCompares.cpp Added support to optimize comparisons with "lshr exact" of a constant. 2014-06-02 19:19:04 +00:00
InstCombineLoadStoreAlloca.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
InstCombineMulDivRem.cpp Optimize integral reciprocal (udiv 1, x and sdiv 1, x) to not use division. This fires exactly once in a clang bootstrap, but covers a few different results from http://www.cs.utah.edu/~regehr/souper/ 2014-05-14 03:03:05 +00:00
InstCombinePHI.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
InstCombineSelect.cpp Added inst combine transforms for single bit tests from Chris's note 2014-06-02 07:24:36 +00:00
InstCombineShifts.cpp Reorder shuffle and binary operation. 2014-05-11 08:46:12 +00:00
InstCombineSimplifyDemanded.cpp Rename ComputeMaskedBits to computeKnownBits. "Masked" has been 2014-05-14 21:14:37 +00:00
InstCombineVectorOps.cpp Fix type of shuffle resulted from shuffle merge. 2014-05-13 06:07:21 +00:00
InstCombineWorklist.h [C++] Use 'nullptr'. 2014-04-28 04:05:08 +00:00
InstructionCombining.cpp And fix my fix to sink down through the type at the right time. My 2014-05-29 23:21:12 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Makefile