[llvm-commits] [llvm] r92384 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Chris Lattner sabre at nondot.org
Thu Dec 31 17:54:08 PST 2009


Author: lattner
Date: Thu Dec 31 19:54:08 2009
New Revision: 92384

URL: http://llvm.org/viewvc/llvm-project?rev=92384&view=rev
Log:
add missing line.

Modified:
    llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=92384&r1=92383&r2=92384&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Thu Dec 31 19:54:08 2009
@@ -10149,8 +10149,9 @@
       if (Power->isOne())
         return ReplaceInstUsesWith(CI, II->getOperand(1));
       // powi(x, -1) -> 1/x
-      return BinaryOperator::CreateFDiv(ConstantFP::get(CI.getType(), 1.0),
-                                        II->getOperand(1));
+      if (Power->isAllOnesValue())
+        return BinaryOperator::CreateFDiv(ConstantFP::get(CI.getType(), 1.0),
+                                          II->getOperand(1));
     }
     break;
       





More information about the llvm-commits mailing list