diff options
author | Alon Zakai <azakai@google.com> | 2021-03-29 13:25:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-29 13:25:24 -0700 |
commit | bac5b8195dd8bf6cd105559a04bb0e069aaddf97 (patch) | |
tree | 0ad8a60fd013b279a82b1b656b1434b43a88f852 /src/tools/wasm-reduce.cpp | |
parent | 41594d7a5bad76f567559e9496ab3d98ba170361 (diff) | |
download | binaryen-bac5b8195dd8bf6cd105559a04bb0e069aaddf97.tar.gz binaryen-bac5b8195dd8bf6cd105559a04bb0e069aaddf97.tar.bz2 binaryen-bac5b8195dd8bf6cd105559a04bb0e069aaddf97.zip |
Fix reduction of nondefaultable tuples (#3746)
There is a makeZeros right below that, which will assert on a nondefaultable
type.
Diffstat (limited to 'src/tools/wasm-reduce.cpp')
-rw-r--r-- | src/tools/wasm-reduce.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp index 95e315e96..b84fe8e38 100644 --- a/src/tools/wasm-reduce.cpp +++ b/src/tools/wasm-reduce.cpp @@ -1085,7 +1085,7 @@ struct Reducer RefNull* n = builder->makeRefNull(curr->type); return tryToReplaceCurrent(n); } - if (curr->type.isTuple()) { + if (curr->type.isTuple() && curr->type.isDefaultable()) { Expression* n = builder->makeConstantExpression(Literal::makeZeros(curr->type)); return tryToReplaceCurrent(n); |