mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-08 12:21:04 +00:00
Restore the PHI optimization I accidently removed
llvm-svn: 170024
This commit is contained in:
parent
5ff8f96e19
commit
6db2e9667a
@ -354,6 +354,10 @@ Instruction *InstCombiner::visitFAdd(BinaryOperator &I) {
|
||||
if (Value *V = SimplifyFAddInst(LHS, RHS, I.getFastMathFlags(), TD))
|
||||
return ReplaceInstUsesWith(I, V);
|
||||
|
||||
if (isa<PHINode>(LHS))
|
||||
if (Instruction *NV = FoldOpIntoPhi(I))
|
||||
return NV;
|
||||
|
||||
// -A + B --> B - A
|
||||
// -A + -B --> -(A + B)
|
||||
if (Value *LHSV = dyn_castFNegVal(LHS))
|
||||
|
Loading…
Reference in New Issue
Block a user