llvm-6502/lib
David Majnemer 6c2e8874b0 InstCombine: Stop two transforms dueling
InstCombineMulDivRem has:
// Canonicalize (X+C1)*CI -> X*CI+C1*CI.

InstCombineAddSub has:
// W*X + Y*Z --> W * (X+Z)  iff W == Y

These two transforms could fight with each other if C1*CI would not fold
away to something simpler than a ConstantExpr mul.

The InstCombineMulDivRem transform only acted on ConstantInts until
r199602 when it was changed to operate on all Constants in order to
let it fire on ConstantVectors.

To fix this, make this transform more careful by checking to see if we
actually folded away C1*CI.

This fixes PR20079.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211258 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-19 07:14:33 +00:00
..
Analysis Move optimization of some cases of (A & C1)|(B & C2) from instcombine to instsimplify. Patch by Rahul Jain, plus some last minute changes by me -- you can blame me for any bugs. 2014-06-19 03:51:46 +00:00
AsmParser IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
Bitcode Revert a C API difference that I incorrectly introduced. 2014-06-18 20:07:35 +00:00
CodeGen Move -dwarf-version to an MC level command line option so it's 2014-06-19 06:22:08 +00:00
DebugInfo [DWARF parser] Use distinction between DW_AT_ranges_base and DW_AT_GNU_ranges_base instead of DWARF version 2014-06-13 22:31:03 +00:00
ExecutionEngine Replace Execution Engine's mutex with std::recursive_mutex. 2014-06-18 20:17:35 +00:00
IR Make getBaseObject static. 2014-06-18 19:08:47 +00:00
IRReader Remove 'using std::errro_code' from lib. 2014-06-13 02:24:39 +00:00
LineEditor
Linker Replace some assert(0)'s with llvm_unreachable. 2014-06-18 05:05:13 +00:00
LTO Remove 'using std::errro_code' from lib. 2014-06-13 02:24:39 +00:00
MC Move -dwarf-version to an MC level command line option so it's 2014-06-19 06:22:08 +00:00
Object Teach llvm-size to know about Mach-O universal files (aka fat files) and 2014-06-18 22:04:40 +00:00
Option Options: Use erase_if to remove Args from the list. 2014-05-18 15:14:13 +00:00
ProfileData Renaming SwapByteOrder() to getSwappedBytes() 2014-06-14 11:36:01 +00:00
Support Revert "Random Number Generator (llvm)" 2014-06-18 06:33:23 +00:00
TableGen Convert some assert(0) to llvm_unreachable or fold an 'if' condition into the assert. 2014-06-19 06:10:58 +00:00
Target Convert some assert(0) to llvm_unreachable or fold an 'if' condition into the assert. 2014-06-19 06:10:58 +00:00
Transforms InstCombine: Stop two transforms dueling 2014-06-19 07:14:33 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile