llvm-6502/lib/Transforms/InstCombine
Rafael Espindola e8075c6877 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209746 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-28 15:30:40 +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-05-28 15:30:40 +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 InstCombine: Optimize -x s< cst 2014-05-15 00:02:20 +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 for 'MIN(MIN(A, 97), 23)' and 'MAX(MAX(A, 23), 97)' 2014-05-19 07:08:32 +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 Revert r209049 and r209065, "Add support for combining GEPs across PHI nodes" 2014-05-17 14:39:21 +00:00
LLVMBuild.txt
Makefile