llvm-project/llvm/lib/Transforms
David Majnemer 6cf6c05322 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.

llvm-svn: 211258
2014-06-19 07:14:33 +00:00
..
Hello [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
IPO IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
InstCombine InstCombine: Stop two transforms dueling 2014-06-19 07:14:33 +00:00
Instrumentation [msan] Handle X86 *.psad.* and *.pmadd.* intrinsics. 2014-06-18 12:02:29 +00:00
ObjCARC Add comdat key field to llvm.global_ctors and llvm.global_dtors 2014-05-16 20:39:27 +00:00
Scalar Fixed jump threading going to infinite loop. 2014-06-17 14:34:19 +00:00
Utils LowerSwitch: track bounding range for the condition tree. 2014-06-16 16:55:20 +00:00
Vectorize [SLP] Enable vectorization of GEP expressions. 2014-06-06 15:34:24 +00:00
CMakeLists.txt Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00
LLVMBuild.txt Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00
Makefile Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00