summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2020-07-16 10:27:41 -0700
committerGitHub <noreply@github.com>2020-07-16 10:27:41 -0700
commit04e859622ca2d91cc1a3adee1167a1b114b694b8 (patch)
treed26596eee580003dae38ee4f45e75d4cc9c34934 /src
parentbd52b8845aa8dcbecc8fc14d77a2bd4e64ad6e75 (diff)
downloadwabt-04e859622ca2d91cc1a3adee1167a1b114b694b8.tar.gz
wabt-04e859622ca2d91cc1a3adee1167a1b114b694b8.tar.bz2
wabt-04e859622ca2d91cc1a3adee1167a1b114b694b8.zip
Fix folding for *.load_splat and table.fill (#1486)
Also remove default case from `ir-util.cc` so we get compile warnings in the future.
Diffstat (limited to 'src')
-rw-r--r--src/ir-util.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ir-util.cc b/src/ir-util.cc
index 7e2bc583..e3d23057 100644
--- a/src/ir-util.cc
+++ b/src/ir-util.cc
@@ -171,6 +171,7 @@ ModuleContext::Arities ModuleContext::GetExprArity(const Expr& expr) const {
case ExprType::MemoryFill:
case ExprType::MemoryCopy:
case ExprType::TableCopy:
+ case ExprType::TableFill:
return { 3, 0 };
case ExprType::AtomicLoad:
@@ -181,6 +182,7 @@ ModuleContext::Arities ModuleContext::GetExprArity(const Expr& expr) const {
case ExprType::Unary:
case ExprType::TableGet:
case ExprType::RefIsNull:
+ case ExprType::LoadSplat:
return { 1, 1 };
case ExprType::Drop:
@@ -257,10 +259,5 @@ ModuleContext::Arities ModuleContext::GetExprArity(const Expr& expr) const {
case ExprType::SimdShuffleOp:
return { 2, 1 };
-
- default:
- fprintf(stderr, "bad expr type: %s\n", GetExprTypeName(expr));
- assert(0);
- return { 0, 0 };
}
}