llvm-project/llvm/lib
Rafael Espindola 04c2258624 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
..
Analysis implement missing SCEVDivision case 2014-05-29 19:44:09 +00:00
AsmParser Update comments to match reality. 2014-06-03 20:25:26 +00:00
Bitcode Allow alias to point to an arbitrary ConstantExpr. 2014-06-03 02:41:57 +00:00
CodeGen Add a subtarget hook: enablePostMachineScheduler. 2014-06-04 07:06:27 +00:00
DebugInfo [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
ExecutionEngine Allow alias to point to an arbitrary ConstantExpr. 2014-06-03 02:41:57 +00:00
IR Fix gcc -Wparentheses warning. 2014-06-04 11:21:11 +00:00
IRReader [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 06:32:26 +00:00
LTO Allow alias to point to an arbitrary ConstantExpr. 2014-06-03 02:41:57 +00:00
LineEditor [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Linker Allow alias to point to an arbitrary ConstantExpr. 2014-06-03 02:41:57 +00:00
MC Fix MIPS exception personality encoding. 2014-05-30 16:48:56 +00:00
Object Use an enum class. 2014-06-03 05:26:12 +00:00
Option Options: Use erase_if to remove Args from the list. 2014-05-18 15:14:13 +00:00
ProfileData Use an enum class. 2014-06-03 05:12:33 +00:00
Support GraphWriter: try gv before xdg-open 2014-06-04 04:11:12 +00:00
TableGen Fix typos in tablegen error messages 2014-05-31 05:18:52 +00:00
Target [AArch64] clang-format the load/store optimizer. 2014-06-04 12:40:35 +00:00
Transforms InstCombine: Improvement to check if signed addition overflows. 2014-06-04 15:39:14 +00:00
CMakeLists.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
LLVMBuild.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
Makefile ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00