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

Unified Diff: src/compiler/int64-lowering.cc

Issue 1807273002: [wasm] Int64Lowering of Int64Mul on ia32 and arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-phi
Patch Set: Forgot to add the visit functions on mips, ppc, and x87. Created 4 years, 9 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
Index: src/compiler/int64-lowering.cc
diff --git a/src/compiler/int64-lowering.cc b/src/compiler/int64-lowering.cc
index 9f749224da5f86b48370f324665bf9251909dd5a..fe4a70aed2d5a264d497ef651c7bd9a61ab450de 100644
--- a/src/compiler/int64-lowering.cc
+++ b/src/compiler/int64-lowering.cc
@@ -197,6 +197,12 @@ void Int64Lowering::PrepareReplacements(Node* node) {
PrepareProjectionReplacements(node);
break;
}
+ case IrOpcode::kInt64Mul: {
+ // An Int64Sub node is changed into a Int32PairSub node. The two
+ // outputs of the Int32PairSub will be accessed through projections.
+ PrepareProjectionReplacements(node);
+ break;
+ }
case IrOpcode::kWord64Or: {
Node* low_node =
graph()->NewNode(machine()->Word32Or(), placeholder_, placeholder_);
@@ -491,6 +497,20 @@ void Int64Lowering::LowerNode(Node* node) {
NodeProperties::ChangeOp(node, machine()->Int32PairSub());
break;
}
+ case IrOpcode::kInt64Mul: {
+ DCHECK(node->InputCount() == 2);
+
+ Node* right = node->InputAt(1);
+ node->ReplaceInput(1, GetReplacementLow(right));
+ node->AppendInput(zone(), GetReplacementHigh(right));
+
+ Node* left = node->InputAt(0);
+ node->ReplaceInput(0, GetReplacementLow(left));
+ node->InsertInput(zone(), 1, GetReplacementHigh(left));
+
+ NodeProperties::ChangeOp(node, machine()->Int32PairMul());
+ break;
+ }
case IrOpcode::kWord64Or: {
DCHECK(node->InputCount() == 2);
Node* left = node->InputAt(0);

Powered by Google App Engine
This is Rietveld 408576698