diff options
author | Matheus Marchini <mmarchini@netflix.com> | 2020-03-27 11:08:42 -0700 |
---|---|---|
committer | Matheus Marchini <mmarchini@netflix.com> | 2020-04-03 21:55:19 -0700 |
commit | 3052769bbc222fb5972cd90ca81b5102fb676360 (patch) | |
tree | 25ddbf66fbe4f5c5f7586e842af4efdd5e1b8ba7 /deps/v8/src/compiler | |
parent | 05841335c5d209efe6e249a57f3798d5c1154a8f (diff) | |
download | node-new-3052769bbc222fb5972cd90ca81b5102fb676360.tar.gz |
deps: patch V8 to 8.1.307.26
Refs: https://github.com/v8/v8/compare/8.1.307.20...8.1.307.26
PR-URL: https://github.com/nodejs/node/pull/32521
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/v8/src/compiler')
-rw-r--r-- | deps/v8/src/compiler/simd-scalar-lowering.cc | 35 | ||||
-rw-r--r-- | deps/v8/src/compiler/wasm-compiler.cc | 5 |
2 files changed, 26 insertions, 14 deletions
diff --git a/deps/v8/src/compiler/simd-scalar-lowering.cc b/deps/v8/src/compiler/simd-scalar-lowering.cc index 9d13bbfa98..b5e0410d50 100644 --- a/deps/v8/src/compiler/simd-scalar-lowering.cc +++ b/deps/v8/src/compiler/simd-scalar-lowering.cc @@ -909,29 +909,36 @@ void SimdScalarLowering::LowerNode(Node* node) { } case IrOpcode::kParameter: { DCHECK_EQ(1, node->InputCount()); + int param_count = static_cast<int>(signature()->parameter_count()); // Only exchange the node if the parameter count actually changed. We do - // not even have to do the default lowering because the the start node, + // not even have to do the default lowering because the start node, // the only input of a parameter node, only changes if the parameter count // changes. - if (GetParameterCountAfterLowering() != - static_cast<int>(signature()->parameter_count())) { + if (GetParameterCountAfterLowering() != param_count) { int old_index = ParameterIndexOf(node->op()); + // Parameter index 0 is the instance parameter, we will use old_index to + // index into the function signature, so we need to decrease it by 1. + --old_index; int new_index = GetParameterIndexAfterLoweringSimd128(signature(), old_index); - if (old_index == new_index) { - NodeProperties::ChangeOp(node, common()->Parameter(new_index)); + // Similarly, the index into function signature needs to account for the + // instance parameter, so increase it by 1. + ++new_index; + NodeProperties::ChangeOp(node, common()->Parameter(new_index)); + if (old_index < 0) { + break; + } + + DCHECK(old_index < param_count); + + if (signature()->GetParam(old_index) == + MachineRepresentation::kSimd128) { Node* new_node[kNumLanes32]; - for (int i = 0; i < kNumLanes32; ++i) { - new_node[i] = nullptr; - } new_node[0] = node; - if (signature()->GetParam(old_index) == - MachineRepresentation::kSimd128) { - for (int i = 1; i < kNumLanes32; ++i) { - new_node[i] = graph()->NewNode(common()->Parameter(new_index + i), - graph()->start()); - } + for (int i = 1; i < kNumLanes32; ++i) { + new_node[i] = graph()->NewNode(common()->Parameter(new_index + i), + graph()->start()); } ReplaceNode(node, new_node, kNumLanes32); } diff --git a/deps/v8/src/compiler/wasm-compiler.cc b/deps/v8/src/compiler/wasm-compiler.cc index 55cb950cff..db1731f388 100644 --- a/deps/v8/src/compiler/wasm-compiler.cc +++ b/deps/v8/src/compiler/wasm-compiler.cc @@ -6932,6 +6932,11 @@ wasm::WasmCompilationResult ExecuteTurbofanWasmCompilation( call_descriptor = GetI32WasmCallDescriptor(&zone, call_descriptor); } + if (ContainsSimd(func_body.sig) && + (!CpuFeatures::SupportsWasmSimd128() || env->lower_simd)) { + call_descriptor = GetI32WasmCallDescriptorForSimd(&zone, call_descriptor); + } + Pipeline::GenerateCodeForWasmFunction( &info, wasm_engine, mcgraph, call_descriptor, source_positions, node_origins, func_body, env->module, func_index); |