mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
Rename SimplifyDistributed to the more meaningfull name SimplifyByFactorizing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120051 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -288,11 +288,11 @@ static bool RightDistributesOverLeft(Instruction::BinaryOps LOp,
|
||||
return false;
|
||||
}
|
||||
|
||||
/// SimplifyDistributed - This tries to simplify binary operations which some
|
||||
/// other binary operation distributes over (eg "A*B+A*C" -> "A*(B+C)" since
|
||||
/// addition is distributed over by multiplication). Returns the result of
|
||||
/// the simplification, or null if no simplification was performed.
|
||||
Instruction *InstCombiner::SimplifyDistributed(BinaryOperator &I) {
|
||||
/// SimplifyByFactorizing - This tries to simplify binary operations which
|
||||
/// some other binary operation distributes over by factorizing out a common
|
||||
/// term (eg "(A*B)+(A*C)" -> "A*(B+C)"). Returns the simplified value, or
|
||||
/// null if no simplification was performed.
|
||||
Instruction *InstCombiner::SimplifyByFactorizing(BinaryOperator &I) {
|
||||
BinaryOperator *Op0 = dyn_cast<BinaryOperator>(I.getOperand(0));
|
||||
BinaryOperator *Op1 = dyn_cast<BinaryOperator>(I.getOperand(1));
|
||||
if (!Op0 || !Op1 || Op0->getOpcode() != Op1->getOpcode())
|
||||
|
Reference in New Issue
Block a user