Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index f1720f444247d83635c84d00a99cf2457ee0022e..e85c0e7b48341be82afb844628a64ade6c122987 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -663,6 +663,9 @@ class HValue : public ZoneObject { |
void DeleteAndReplaceWith(HValue* other); |
void ReplaceAllUsesWith(HValue* other); |
bool HasNoUses() const { return use_list_ == NULL; } |
+ bool HasOneUse() const { |
+ return use_list_ != NULL && use_list_->tail() == NULL; |
+ } |
bool HasMultipleUses() const { |
return use_list_ != NULL && use_list_->tail() != NULL; |
} |
@@ -3760,7 +3763,7 @@ class HBinaryOperation : public HTemplateInstruction<3> { |
// Otherwise, if there is only one use of the right operand, it would be |
// better off on the left for platforms that only have 2-arg arithmetic |
// ops (e.g ia32, x64) that clobber the left operand. |
- return right()->UseCount() == 1; |
+ return right()->HasOneUse(); |
} |
HValue* BetterLeftOperand() { |