Revert "Restore the PHI optimization I accidently removed" temporarily since
authorEric Christopher <echristo@gmail.com>
Thu, 13 Dec 2012 06:48:05 +0000 (06:48 +0000)
committerEric Christopher <echristo@gmail.com>
Thu, 13 Dec 2012 06:48:05 +0000 (06:48 +0000)
it seems to be breaking self-host for a few people and is PR14592.

This reverts commit r170024.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170106 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineAddSub.cpp

index 01a3c48635acd4bdba10b26d9c59a79ff15ca7e8..c22249527b9135abb9e95c72098f43c5591ce259 100644 (file)
@@ -354,10 +354,6 @@ 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))