diff options
author | Thomas Lively <tlively@google.com> | 2022-12-21 11:47:48 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-21 09:47:48 -0800 |
commit | 49fb2e23bb3c932389f23fdda33a32d034ca9a0c (patch) | |
tree | fbe18fa7d4809a59a0d9577fb723bf1873d8adeb /src/ir/module-utils.cpp | |
parent | 94a45c6aba605f0f7e0a2fac227a2dd7c03a391f (diff) | |
download | binaryen-49fb2e23bb3c932389f23fdda33a32d034ca9a0c.tar.gz binaryen-49fb2e23bb3c932389f23fdda33a32d034ca9a0c.tar.bz2 binaryen-49fb2e23bb3c932389f23fdda33a32d034ca9a0c.zip |
Support `ref.test null` (#5368)
This new variant of ref.test returns 1 if the input is null.
Diffstat (limited to 'src/ir/module-utils.cpp')
-rw-r--r-- | src/ir/module-utils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir/module-utils.cpp b/src/ir/module-utils.cpp index f7ba7d776..482753b87 100644 --- a/src/ir/module-utils.cpp +++ b/src/ir/module-utils.cpp @@ -73,7 +73,7 @@ struct CodeScanner } else if (auto* cast = curr->dynCast<RefCast>()) { counts.note(cast->type); } else if (auto* cast = curr->dynCast<RefTest>()) { - counts.note(cast->intendedType); + counts.note(cast->castType); } else if (auto* cast = curr->dynCast<BrOn>()) { if (cast->op == BrOnCast || cast->op == BrOnCastFail) { counts.note(cast->intendedType); |