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

Side by Side Diff: src/compiler/int64-lowering.cc

Issue 1803453003: [wasm] Int64Lowering of Word64Popcnt. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@arm-shr
Patch Set: Rebase. 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/machine-operator.h » ('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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 } 440 }
441 ReplaceNode(node, input, graph()->NewNode(common()->Int32Constant(0))); 441 ReplaceNode(node, input, graph()->NewNode(common()->Int32Constant(0)));
442 node->NullAllInputs(); 442 node->NullAllInputs();
443 break; 443 break;
444 } 444 }
445 // kExprF64ReinterpretI64: 445 // kExprF64ReinterpretI64:
446 // kExprI64ReinterpretF64: 446 // kExprI64ReinterpretF64:
447 447
448 // kExprI64Clz: 448 // kExprI64Clz:
449 // kExprI64Ctz: 449 // kExprI64Ctz:
450 case IrOpcode::kWord64Popcnt: {
451 DCHECK(node->InputCount() == 1);
452 Node* input = node->InputAt(0);
453 // We assume that a Word64Popcnt node only has been created if
454 // Word32Popcnt is actually supported.
455 DCHECK(machine()->Word32Popcnt().IsSupported());
456 ReplaceNode(node, graph()->NewNode(
457 machine()->Int32Add(),
458 graph()->NewNode(machine()->Word32Popcnt().op(),
459 GetReplacementLow(input)),
460 graph()->NewNode(machine()->Word32Popcnt().op(),
461 GetReplacementHigh(input))),
462 graph()->NewNode(common()->Int32Constant(0)));
463 break;
464 }
450 // kExprI64Popcnt: 465 // kExprI64Popcnt:
451 466
452 default: { DefaultLowering(node); } 467 default: { DefaultLowering(node); }
453 } 468 }
454 } 469 }
455 470
456 void Int64Lowering::LowerComparison(Node* node, const Operator* high_word_op, 471 void Int64Lowering::LowerComparison(Node* node, const Operator* high_word_op,
457 const Operator* low_word_op) { 472 const Operator* low_word_op) {
458 DCHECK(node->InputCount() == 2); 473 DCHECK(node->InputCount() == 2);
459 Node* left = node->InputAt(0); 474 Node* left = node->InputAt(0);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 } 525 }
511 526
512 Node* Int64Lowering::GetReplacementHigh(Node* node) { 527 Node* Int64Lowering::GetReplacementHigh(Node* node) {
513 Node* result = replacements_[node->id()].high; 528 Node* result = replacements_[node->id()].high;
514 DCHECK(result); 529 DCHECK(result);
515 return result; 530 return result;
516 } 531 }
517 } // namespace compiler 532 } // namespace compiler
518 } // namespace internal 533 } // namespace internal
519 } // namespace v8 534 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698