mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
make reassociate more careful about not leaving around dead mul's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92370 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f8a447de16
commit
1e7558b656
@ -530,7 +530,13 @@ Value *Reassociate::RemoveFactorFromExpression(Value *V, Value *Factor) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Factors.size() == 1) return Factors[0].Op;
|
// If this was just a single multiply, remove the multiply and return the only
|
||||||
|
// remaining operand.
|
||||||
|
if (Factors.size() == 1) {
|
||||||
|
ValueRankMap.erase(BO);
|
||||||
|
BO->eraseFromParent();
|
||||||
|
return Factors[0].Op;
|
||||||
|
}
|
||||||
|
|
||||||
RewriteExprTree(BO, Factors);
|
RewriteExprTree(BO, Factors);
|
||||||
return BO;
|
return BO;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user