add missing line.
authorChris Lattner <sabre@nondot.org>
Fri, 1 Jan 2010 01:54:08 +0000 (01:54 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 1 Jan 2010 01:54:08 +0000 (01:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92384 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index cd553f0811a72323d6544e72f6fa34c854421889..516d72ea89967160c2efbc00a1032988ac60e81f 100644 (file)
@@ -10149,8 +10149,9 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
       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;