aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/PHITransAddr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/PHITransAddr.cpp')
-rw-r--r--lib/Analysis/PHITransAddr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/PHITransAddr.cpp b/lib/Analysis/PHITransAddr.cpp
index bea88326cc..a1b2afbaf7 100644
--- a/lib/Analysis/PHITransAddr.cpp
+++ b/lib/Analysis/PHITransAddr.cpp
@@ -280,7 +280,8 @@ Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB,
for (Value::use_iterator UI = LHS->use_begin(), E = LHS->use_end();
UI != E; ++UI) {
if (BinaryOperator *BO = dyn_cast<BinaryOperator>(*UI))
- if (BO->getOperand(0) == LHS && BO->getOperand(1) == RHS &&
+ if (BO->getOpcode() == Instruction::Add &&
+ BO->getOperand(0) == LHS && BO->getOperand(1) == RHS &&
BO->getParent()->getParent() == CurBB->getParent())
return BO;
}