Index: src/compiler/x64/instruction-selector-x64.cc |
diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc |
index 08121bda0cd944507fd123633bf9288c7518cc9d..e77b005ea2a0d41b085b4413f3d166c0e708194f 100644 |
--- a/src/compiler/x64/instruction-selector-x64.cc |
+++ b/src/compiler/x64/instruction-selector-x64.cc |
@@ -584,6 +584,12 @@ void InstructionSelector::VisitWord32Clz(Node* node) { |
} |
+void InstructionSelector::VisitWord64Ctz(Node* node) { |
+ X64OperandGenerator g(this); |
+ Emit(kX64Tzcnt, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
+} |
+ |
+ |
void InstructionSelector::VisitWord32Ctz(Node* node) { |
X64OperandGenerator g(this); |
Emit(kX64Tzcnt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
@@ -1606,7 +1612,7 @@ InstructionSelector::SupportedMachineOperatorFlags() { |
MachineOperatorBuilder::kFloat64Max | |
MachineOperatorBuilder::kFloat64Min | |
MachineOperatorBuilder::kWord32ShiftIsSafe | |
- MachineOperatorBuilder::kWord32Ctz; |
+ MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz; |
if (CpuFeatures::IsSupported(POPCNT)) { |
flags |= MachineOperatorBuilder::kWord32Popcnt; |
} |