llvm-6502/lib
David Majnemer 12baade498 [InstCombine] Don't eagerly propagate nsw for A*B+A*C => A*(B+C)
InstCombine transforms A *nsw B +nsw A *nsw C to A *nsw (B + C).
This is incorrect -- e.g. if A = -1, B = 1, C = INT_SMAX. Then
nothing in the LHS overflows, but the multiplication in RHS overflows.

We need to first make sure that we won't multiple by INT_SMAX + 1.

Test case `add_of_mul` contributed by Sanjoy Das.

This fixes PR23635.

Differential Revision: http://reviews.llvm.org/D9629

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238066 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-22 23:02:11 +00:00
..
Analysis [InstSimplify] Handle some overflow intrinsics in InstSimplify 2015-05-22 03:56:46 +00:00
AsmParser IR / debug info: Add a DWOId field to DICompileUnit, 2015-05-21 20:37:30 +00:00
Bitcode IR / debug info: Add a DWOId field to DICompileUnit, 2015-05-21 20:37:30 +00:00
CodeGen [AArch64][CGP] Sink zext feeding stxr/stlxr into the same block. 2015-05-22 21:37:17 +00:00
DebugInfo Make it easier to use DwarfContext with MCJIT 2015-05-21 21:24:32 +00:00
ExecutionEngine Reapply part of r237975, "Fix Clang -Wmissing-override warning", except for DIContext.h, to apease g++-4.7. 2015-05-22 10:11:07 +00:00
Fuzzer [lib/Fuzzer] remove -use_coverage_pairs=1, an experimental feature that is unlikely to ever scale 2015-05-22 22:47:03 +00:00
IR Use Op<0> accessor instead of OperandList for Instructions. NFC 2015-05-21 22:48:54 +00:00
IRReader Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Linker While in GlobalValue fix the function(s) that don't follow the 2015-05-15 18:20:14 +00:00
LTO LTO: Add API to choose whether to embed uselists 2015-04-27 23:38:54 +00:00
MC MC: Shave a pointer off of MCSymbol::Name 2015-05-22 06:04:42 +00:00
Object Stop inventing symbol sizes. 2015-05-22 15:43:00 +00:00
Option Option parsing: properly handle flag aliases for joined options (PR23394) 2015-05-04 18:00:13 +00:00
Passes [PM] Fixup for r231556 where I missed a dependency on intrinsics 2015-03-07 09:08:20 +00:00
ProfileData InstrProf: Treat functions with a coverage map but no profile as unreached 2015-05-13 22:03:04 +00:00
Support Reinforce ARMTargetParser::getCanonicalArchName validation 2015-05-22 20:43:30 +00:00
TableGen [TableGen] Resolve complex def names inside multiclasses 2015-05-21 04:32:56 +00:00
Target make reciprocal estimate code generation more flexible by adding command-line options 2015-05-22 21:10:06 +00:00
Transforms [InstCombine] Don't eagerly propagate nsw for A*B+A*C => A*(B+C) 2015-05-22 23:02:11 +00:00
CMakeLists.txt [PM] Create a separate library for high-level pass management code. 2015-03-07 09:02:36 +00:00
LLVMBuild.txt Reflow long lines of some LLVMBuild files 2015-05-14 15:38:27 +00:00
Makefile [PM] Create a separate library for high-level pass management code. 2015-03-07 09:02:36 +00:00