projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d27f911
)
add missing line.
author
Chris Lattner
<sabre@nondot.org>
Fri, 1 Jan 2010 01:54:08 +0000
(
01:54
+0000)
committer
Chris 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
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/InstructionCombining.cpp
b/lib/Transforms/Scalar/InstructionCombining.cpp
index cd553f0811a72323d6544e72f6fa34c854421889..516d72ea89967160c2efbc00a1032988ac60e81f 100644
(file)
--- 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;