From f9ead87c681204cf86f9575fc3f08fb4acbf7899 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 1 Jan 2010 01:54:08 +0000 Subject: [PATCH] add missing line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92384 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/InstructionCombining.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index cd553f0811a..516d72ea899 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -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;