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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/int64-lowering.h" 5 #include "src/compiler/int64-lowering.h"
6 #include "src/compiler/common-operator.h" 6 #include "src/compiler/common-operator.h"
7 #include "src/compiler/graph.h" 7 #include "src/compiler/graph.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 Node* high_node = 285 Node* high_node =
286 graph()->NewNode(machine()->Word32Xor(), GetReplacementHigh(left), 286 graph()->NewNode(machine()->Word32Xor(), GetReplacementHigh(left),
287 GetReplacementHigh(right)); 287 GetReplacementHigh(right));
288 ReplaceNode(node, low_node, high_node); 288 ReplaceNode(node, low_node, high_node);
289 break; 289 break;
290 } 290 }
291 // kExprI64Shl: 291 // kExprI64Shl:
292 // kExprI64ShrU: 292 // kExprI64ShrU:
293 // kExprI64ShrS: 293 // kExprI64ShrS:
294 // kExprI64Eq: 294 // kExprI64Eq:
295 case IrOpcode::kWord64Equal: {
296 DCHECK(node->InputCount() == 2);
297 Node* left = node->InputAt(0);
298 Node* right = node->InputAt(1);
299
300 // TODO(wasm): Use explicit comparisons and && here?
301 Node* replacement = graph()->NewNode(
302 machine()->Word32Equal(),
303 graph()->NewNode(
304 machine()->Word32Or(),
305 graph()->NewNode(machine()->Word32Xor(), GetReplacementLow(left),
306 GetReplacementLow(right)),
307 graph()->NewNode(machine()->Word32Xor(), GetReplacementHigh(left),
308 GetReplacementHigh(right))),
309 graph()->NewNode(common()->Int32Constant(0)));
310
311 ReplaceNode(node, replacement, nullptr);
312 break;
313 }
295 // kExprI64Ne: 314 // kExprI64Ne:
296 // kExprI64LtS: 315 // kExprI64LtS:
297 // kExprI64LeS: 316 // kExprI64LeS:
298 // kExprI64LtU: 317 // kExprI64LtU:
299 // kExprI64LeU: 318 // kExprI64LeU:
300 // kExprI64GtS: 319 // kExprI64GtS:
301 // kExprI64GeS: 320 // kExprI64GeS:
302 // kExprI64GtU: 321 // kExprI64GtU:
303 // kExprI64GeU: 322 // kExprI64GeU:
304 323
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 } 381 }
363 382
364 Node* Int64Lowering::GetReplacementHigh(Node* node) { 383 Node* Int64Lowering::GetReplacementHigh(Node* node) {
365 Node* result = replacements_[node->id()].high; 384 Node* result = replacements_[node->id()].high;
366 DCHECK(result); 385 DCHECK(result);
367 return result; 386 return result;
368 } 387 }
369 } // namespace compiler 388 } // namespace compiler
370 } // namespace internal 389 } // namespace internal
371 } // namespace v8 390 } // namespace v8
OLDNEW
« 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