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

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

Issue 1729493002: [wasm] I added I64Eq to the Int64Lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int64-lowering-xor
Patch Set: rebase Created 4 years, 10 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/compiler/wasm-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/int64-lowering.cc
diff --git a/src/compiler/int64-lowering.cc b/src/compiler/int64-lowering.cc
index 2c32b962c3fc00d4af846adf6c9ae13f4137b8e2..064c86c679a766157fe16bbbc0743fe565055fd6 100644
--- a/src/compiler/int64-lowering.cc
+++ b/src/compiler/int64-lowering.cc
@@ -292,6 +292,25 @@ void Int64Lowering::LowerNode(Node* node) {
// kExprI64ShrU:
// kExprI64ShrS:
// kExprI64Eq:
+ case IrOpcode::kWord64Equal: {
+ DCHECK(node->InputCount() == 2);
+ Node* left = node->InputAt(0);
+ Node* right = node->InputAt(1);
+
+ // TODO(wasm): Use explicit comparisons and && here?
+ Node* replacement = graph()->NewNode(
+ machine()->Word32Equal(),
+ graph()->NewNode(
+ machine()->Word32Or(),
+ graph()->NewNode(machine()->Word32Xor(), GetReplacementLow(left),
+ GetReplacementLow(right)),
+ graph()->NewNode(machine()->Word32Xor(), GetReplacementHigh(left),
+ GetReplacementHigh(right))),
+ graph()->NewNode(common()->Int32Constant(0)));
+
+ ReplaceNode(node, replacement, nullptr);
+ break;
+ }
// kExprI64Ne:
// kExprI64LtS:
// kExprI64LeS:
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698