Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: src/arm/lithium-arm.cc

Issue 323423003: ARM: Avoid duplicate vmla when merging vmul and vadd (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-arm.cc
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
index 93dc830dab30e3630bac62966133e5c35f3e8843..34cb1fcacc37cd9cb2e152c32e6b3ade77825e14 100644
--- a/src/arm/lithium-arm.cc
+++ b/src/arm/lithium-arm.cc
@@ -1500,8 +1500,8 @@ LInstruction* LChunkBuilder::DoMul(HMul* instr) {
return DefineAsRegister(mul);
} else if (instr->representation().IsDouble()) {
- if (instr->UseCount() == 1 && (instr->uses().value()->IsAdd() ||
- instr->uses().value()->IsSub())) {
+ if (instr->HasOneUse() && (instr->uses().value()->IsAdd() ||
+ instr->uses().value()->IsSub())) {
HBinaryOperation* use = HBinaryOperation::cast(instr->uses().value());
if (use->IsAdd() && instr == use->left()) {
@@ -1547,7 +1547,7 @@ LInstruction* LChunkBuilder::DoSub(HSub* instr) {
}
return result;
} else if (instr->representation().IsDouble()) {
- if (instr->right()->IsMul()) {
+ if (instr->right()->IsMul() && instr->right()->HasOneUse()) {
return DoMultiplySub(instr->left(), HMul::cast(instr->right()));
}
@@ -1618,12 +1618,12 @@ LInstruction* LChunkBuilder::DoAdd(HAdd* instr) {
LInstruction* result = DefineAsRegister(add);
return result;
} else if (instr->representation().IsDouble()) {
- if (instr->left()->IsMul()) {
+ if (instr->left()->IsMul() && instr->left()->HasOneUse()) {
return DoMultiplyAdd(HMul::cast(instr->left()), instr->right());
}
- if (instr->right()->IsMul()) {
- ASSERT(!instr->left()->IsMul());
+ if (instr->right()->IsMul() && instr->right()->HasOneUse()) {
+ ASSERT(!instr->left()->IsMul() || !instr->left()->HasOneUse());
return DoMultiplyAdd(HMul::cast(instr->right()), instr->left());
}
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698