Commit d49a1842 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm] Don't put TailCall nodes in the effect chain

TailCalls have no output effect, similarly to e.g. return nodes. Thus,
don't put them in the effect chain.
The current graph verifier does not complain about this, but once we
switch to the GraphAssembler, we will hit a SLOW_DCHECK there because
we are trying to use a node as effect which has no effect output.

R=jkummerow@chromium.org

Bug: v8:10070
Change-Id: I23d9516eb9bd42a5aca46b09ca74830eafce635c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2017474
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65973}
parent 003f622a
......@@ -2621,8 +2621,9 @@ Node* WasmGraphBuilder::BuildCallNode(wasm::FunctionSig* sig,
inputs[params + 2] = Effect();
inputs[params + 3] = Control();
Node* call =
SetEffect(graph()->NewNode(op, static_cast<int>(count), inputs.begin()));
Node* call = graph()->NewNode(op, static_cast<int>(count), inputs.begin());
// Return calls have no effect output. Other calls are the new effect node.
if (op->EffectOutputCount() > 0) SetEffect(call);
DCHECK(position == wasm::kNoCodePosition || position > 0);
if (position > 0) SetSourcePosition(call, position);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment