summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/binaryen.js/expressions.js53
-rw-r--r--test/binaryen.js/expressions.js.txt2
-rw-r--r--test/binaryen.js/kitchen-sink.js2
-rw-r--r--test/binaryen.js/kitchen-sink.js.txt2
-rw-r--r--test/example/c-api-kitchen-sink.c13
-rw-r--r--test/example/c-api-kitchen-sink.txt15
-rw-r--r--test/heap-types.wast1
-rw-r--r--test/heap-types.wast.from-wast6
-rw-r--r--test/heap-types.wast.fromBinary6
-rw-r--r--test/heap-types.wast.fromBinary.noDebugInfo6
-rw-r--r--test/lit/cast-to-basic.wast2
-rw-r--r--test/lit/passes/inlining_splitting.wast6
-rw-r--r--test/lit/passes/optimize-instructions-gc-tnh.wast31
-rw-r--r--test/lit/passes/optimize-instructions-gc.wast127
-rw-r--r--test/lit/wat-kitchen-sink.wast37
-rw-r--r--test/passes/translate-to-fuzz_all-features_metrics_noprint.txt2
16 files changed, 45 insertions, 266 deletions
diff --git a/test/binaryen.js/expressions.js b/test/binaryen.js/expressions.js
index c0bc402a0..ee55ee90b 100644
--- a/test/binaryen.js/expressions.js
+++ b/test/binaryen.js/expressions.js
@@ -1417,51 +1417,30 @@ console.log("# MemoryFill");
module.dispose();
})();
-console.log("# RefIs");
-(function testRefIs() {
+console.log("# RefIsNull");
+(function testRefIsNull() {
const module = new binaryen.Module();
- var op = binaryen.Operations.RefIsNull;
var value = module.local.get(1, binaryen.externref);
- const theRefIs = binaryen.RefIs(module.ref.is_null(value));
- assert(theRefIs instanceof binaryen.RefIs);
- assert(theRefIs instanceof binaryen.Expression);
- assert(theRefIs.op === op);
- assert(theRefIs.value === value);
- assert(theRefIs.type === binaryen.i32);
-
- theRefIs.op = op = binaryen.Operations.RefIsFunc;
- assert(theRefIs.op === op);
- theRefIs.op = op = binaryen.Operations.RefIsNull;
- theRefIs.value = value = module.local.get(2, binaryen.externref);
- assert(theRefIs.value === value);
- theRefIs.type = binaryen.f64;
- theRefIs.finalize();
- assert(theRefIs.type === binaryen.i32);
-
- console.log(theRefIs.toText());
+ const theRefIsNull = binaryen.RefIsNull(module.ref.is_null(value));
+ assert(theRefIsNull instanceof binaryen.RefIsNull);
+ assert(theRefIsNull instanceof binaryen.Expression);
+ assert(theRefIsNull.value === value);
+ assert(theRefIsNull.type === binaryen.i32);
+
+ theRefIsNull.value = value = module.local.get(2, binaryen.externref);
+ assert(theRefIsNull.value === value);
+ theRefIsNull.type = binaryen.f64;
+ theRefIsNull.finalize();
+ assert(theRefIsNull.type === binaryen.i32);
+
+ console.log(theRefIsNull.toText());
assert(
- theRefIs.toText()
+ theRefIsNull.toText()
==
"(ref.is_null\n (local.get $2)\n)\n"
);
- assert(
- binaryen.RefIs(module.ref.is_func(value)).toText()
- ==
- "(ref.is_func\n (local.get $2)\n)\n"
- );
- assert(
- binaryen.RefIs(module.ref.is_data(value)).toText()
- ==
- "(ref.is_data\n (local.get $2)\n)\n"
- );
- assert(
- binaryen.RefIs(module.ref.is_i31(value)).toText()
- ==
- "(ref.is_i31\n (local.get $2)\n)\n"
- );
-
module.dispose();
})();
diff --git a/test/binaryen.js/expressions.js.txt b/test/binaryen.js/expressions.js.txt
index fbf69888a..75f3a8d54 100644
--- a/test/binaryen.js/expressions.js.txt
+++ b/test/binaryen.js/expressions.js.txt
@@ -214,7 +214,7 @@
(i32.const 6)
)
-# RefIs
+# RefIsNull
(ref.is_null
(local.get $2)
)
diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js
index 52d8fd16f..0de23883a 100644
--- a/test/binaryen.js/kitchen-sink.js
+++ b/test/binaryen.js/kitchen-sink.js
@@ -145,7 +145,7 @@ function test_ids() {
console.log("MemoryFillId: " + binaryen.MemoryFillId);
console.log("PopId: " + binaryen.PopId);
console.log("RefNullId: " + binaryen.RefNullId);
- console.log("RefIsId: " + binaryen.RefIsId);
+ console.log("RefIsNullId: " + binaryen.RefIsNullId);
console.log("RefFuncId: " + binaryen.RefFuncId);
console.log("RefEqId: " + binaryen.RefEqId);
console.log("TableGetId: " + binaryen.TableGetId);
diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt
index c59c2dac1..4798c8592 100644
--- a/test/binaryen.js/kitchen-sink.js.txt
+++ b/test/binaryen.js/kitchen-sink.js.txt
@@ -75,7 +75,7 @@ MemoryCopyId: 38
MemoryFillId: 39
PopId: 40
RefNullId: 41
-RefIsId: 42
+RefIsNullId: 42
RefFuncId: 43
RefEqId: 44
TableGetId: 45
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c
index de105d239..cc2c96538 100644
--- a/test/example/c-api-kitchen-sink.c
+++ b/test/example/c-api-kitchen-sink.c
@@ -1002,8 +1002,8 @@ void test_core() {
iIfF,
BinaryenTypeInt32()),
// Reference types
- BinaryenRefIs(module, BinaryenRefIsNull(), externrefExpr),
- BinaryenRefIs(module, BinaryenRefIsNull(), funcrefExpr),
+ BinaryenRefIsNull(module, externrefExpr),
+ BinaryenRefIsNull(module, funcrefExpr),
BinaryenSelect(
module,
temp10,
@@ -1014,15 +1014,6 @@ void test_core() {
BinaryenRefEq(module,
BinaryenRefNull(module, BinaryenTypeNullref()),
BinaryenRefNull(module, BinaryenTypeNullref())),
- BinaryenRefIs(module,
- BinaryenRefIsFunc(),
- BinaryenRefNull(module, BinaryenTypeNullref())),
- BinaryenRefIs(module,
- BinaryenRefIsData(),
- BinaryenRefNull(module, BinaryenTypeNullref())),
- BinaryenRefIs(module,
- BinaryenRefIsI31(),
- BinaryenRefNull(module, BinaryenTypeNullref())),
BinaryenRefAs(module,
BinaryenRefAsNonNull(),
BinaryenRefNull(module, BinaryenTypeNullref())),
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt
index 1ee529eb3..51298d1a2 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -2004,21 +2004,6 @@ BinaryenFeatureAll: 126975
)
)
(drop
- (ref.is_func
- (ref.null none)
- )
- )
- (drop
- (ref.is_data
- (ref.null none)
- )
- )
- (drop
- (ref.is_i31
- (ref.null none)
- )
- )
- (drop
(ref.as_non_null
(ref.null none)
)
diff --git a/test/heap-types.wast b/test/heap-types.wast
index f75622142..5171d5a66 100644
--- a/test/heap-types.wast
+++ b/test/heap-types.wast
@@ -182,7 +182,6 @@
(unreachable)
)
(func $ref.is_X (param $x anyref)
- (if (ref.is_func (local.get $x)) (unreachable))
(if (ref.is_data (local.get $x)) (unreachable))
(if (ref.is_i31 (local.get $x)) (unreachable))
)
diff --git a/test/heap-types.wast.from-wast b/test/heap-types.wast.from-wast
index 9eafd633b..b551a9073 100644
--- a/test/heap-types.wast.from-wast
+++ b/test/heap-types.wast.from-wast
@@ -177,12 +177,6 @@
)
(func $ref.is_X (type $anyref_=>_none) (param $x anyref)
(if
- (ref.is_func
- (local.get $x)
- )
- (unreachable)
- )
- (if
(ref.is_data
(local.get $x)
)
diff --git a/test/heap-types.wast.fromBinary b/test/heap-types.wast.fromBinary
index 04e9bbe05..485611fef 100644
--- a/test/heap-types.wast.fromBinary
+++ b/test/heap-types.wast.fromBinary
@@ -175,12 +175,6 @@
)
(func $ref.is_X (type $anyref_=>_none) (param $x anyref)
(if
- (ref.is_func
- (local.get $x)
- )
- (unreachable)
- )
- (if
(ref.is_data
(local.get $x)
)
diff --git a/test/heap-types.wast.fromBinary.noDebugInfo b/test/heap-types.wast.fromBinary.noDebugInfo
index 472c3288f..03047def7 100644
--- a/test/heap-types.wast.fromBinary.noDebugInfo
+++ b/test/heap-types.wast.fromBinary.noDebugInfo
@@ -175,12 +175,6 @@
)
(func $2 (type $anyref_=>_none) (param $0 anyref)
(if
- (ref.is_func
- (local.get $0)
- )
- (unreachable)
- )
- (if
(ref.is_data
(local.get $0)
)
diff --git a/test/lit/cast-to-basic.wast b/test/lit/cast-to-basic.wast
index 239fd820c..9433c3ba1 100644
--- a/test/lit/cast-to-basic.wast
+++ b/test/lit/cast-to-basic.wast
@@ -6,7 +6,7 @@
(module
;; CHECK: (func $test (type $none_=>_i32) (result i32)
- ;; CHECK-NEXT: (ref.test data
+ ;; CHECK-NEXT: (ref.is_data
;; CHECK-NEXT: (ref.null none)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
diff --git a/test/lit/passes/inlining_splitting.wast b/test/lit/passes/inlining_splitting.wast
index efd6b3c7d..2f840a494 100644
--- a/test/lit/passes/inlining_splitting.wast
+++ b/test/lit/passes/inlining_splitting.wast
@@ -1163,7 +1163,7 @@
)
;; A second if. We can outline both if bodies.
(if
- (ref.is_func
+ (ref.is_null
(local.get $x)
)
(loop $x
@@ -1200,7 +1200,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
- ;; CHECK-NEXT: (ref.is_func
+ ;; CHECK-NEXT: (ref.is_null
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: )
;; CHECK-NEXT: (call $byn-split-outlined-B$multi-if_0
@@ -1231,7 +1231,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
- ;; CHECK-NEXT: (ref.is_func
+ ;; CHECK-NEXT: (ref.is_null
;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: )
;; CHECK-NEXT: (call $byn-split-outlined-B$multi-if_0
diff --git a/test/lit/passes/optimize-instructions-gc-tnh.wast b/test/lit/passes/optimize-instructions-gc-tnh.wast
index fec4c17f0..67f15de6c 100644
--- a/test/lit/passes/optimize-instructions-gc-tnh.wast
+++ b/test/lit/passes/optimize-instructions-gc-tnh.wast
@@ -140,7 +140,7 @@
)
)
- ;; TNH: (func $ref.is_func_a (type $anyref_=>_i32) (param $a anyref) (result i32)
+ ;; TNH: (func $ref.is_func (type $anyref_=>_i32) (param $a anyref) (result i32)
;; TNH-NEXT: (drop
;; TNH-NEXT: (ref.as_func
;; TNH-NEXT: (local.get $a)
@@ -148,7 +148,7 @@
;; TNH-NEXT: )
;; TNH-NEXT: (i32.const 1)
;; TNH-NEXT: )
- ;; NO_TNH: (func $ref.is_func_a (type $anyref_=>_i32) (param $a anyref) (result i32)
+ ;; NO_TNH: (func $ref.is_func (type $anyref_=>_i32) (param $a anyref) (result i32)
;; NO_TNH-NEXT: (drop
;; NO_TNH-NEXT: (ref.as_func
;; NO_TNH-NEXT: (local.get $a)
@@ -156,7 +156,7 @@
;; NO_TNH-NEXT: )
;; NO_TNH-NEXT: (i32.const 1)
;; NO_TNH-NEXT: )
- (func $ref.is_func_a (param $a (ref null any)) (result i32)
+ (func $ref.is_func (param $a (ref null any)) (result i32)
;; The check must succeed. We can return 1 here, and drop the rest, with or
;; without TNH (in particular, TNH should not just remove the cast but not
;; return a 1).
@@ -167,31 +167,6 @@
)
)
- ;; TNH: (func $ref.is_func_b (type $anyref_=>_i32) (param $a anyref) (result i32)
- ;; TNH-NEXT: (drop
- ;; TNH-NEXT: (ref.as_data
- ;; TNH-NEXT: (local.get $a)
- ;; TNH-NEXT: )
- ;; TNH-NEXT: )
- ;; TNH-NEXT: (i32.const 0)
- ;; TNH-NEXT: )
- ;; NO_TNH: (func $ref.is_func_b (type $anyref_=>_i32) (param $a anyref) (result i32)
- ;; NO_TNH-NEXT: (drop
- ;; NO_TNH-NEXT: (ref.as_data
- ;; NO_TNH-NEXT: (local.get $a)
- ;; NO_TNH-NEXT: )
- ;; NO_TNH-NEXT: )
- ;; NO_TNH-NEXT: (i32.const 0)
- ;; NO_TNH-NEXT: )
- (func $ref.is_func_b (param $a (ref null any)) (result i32)
- ;; A case where the type cannot match, and we return 0.
- (ref.is_func
- (ref.as_data
- (local.get $a)
- )
- )
- )
-
;; TNH: (func $if.arm.null (type $i32_ref|$struct|_=>_none) (param $x i32) (param $ref (ref $struct))
;; TNH-NEXT: (struct.set $struct 0
;; TNH-NEXT: (block (result (ref $struct))
diff --git a/test/lit/passes/optimize-instructions-gc.wast b/test/lit/passes/optimize-instructions-gc.wast
index c0ea515d0..42b915c38 100644
--- a/test/lit/passes/optimize-instructions-gc.wast
+++ b/test/lit/passes/optimize-instructions-gc.wast
@@ -238,17 +238,13 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (i32.eqz
- ;; CHECK-NEXT: (ref.is_null
- ;; CHECK-NEXT: (local.get $func)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (ref.is_func
+ ;; CHECK-NEXT: (local.get $func)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (i32.eqz
- ;; CHECK-NEXT: (ref.is_null
- ;; CHECK-NEXT: (local.get $i31)
- ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: (ref.is_i31
+ ;; CHECK-NEXT: (local.get $i31)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -259,17 +255,13 @@
;; NOMNL-NEXT: )
;; NOMNL-NEXT: )
;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (i32.eqz
- ;; NOMNL-NEXT: (ref.is_null
- ;; NOMNL-NEXT: (local.get $func)
- ;; NOMNL-NEXT: )
+ ;; NOMNL-NEXT: (ref.is_func
+ ;; NOMNL-NEXT: (local.get $func)
;; NOMNL-NEXT: )
;; NOMNL-NEXT: )
;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (i32.eqz
- ;; NOMNL-NEXT: (ref.is_null
- ;; NOMNL-NEXT: (local.get $i31)
- ;; NOMNL-NEXT: )
+ ;; NOMNL-NEXT: (ref.is_i31
+ ;; NOMNL-NEXT: (local.get $i31)
;; NOMNL-NEXT: )
;; NOMNL-NEXT: )
;; NOMNL-NEXT: )
@@ -288,103 +280,6 @@
)
)
- ;; similar to $unneeded_is, but the values are of mixed kind (is_func of
- ;; struct, etc.). regardless of nullability the result here is always 0.
- ;; CHECK: (func $unneeded_is_bad_kinds (type $funcref_dataref_i31ref_=>_none) (param $func funcref) (param $struct dataref) (param $i31 i31ref)
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (block (result i32)
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (local.get $struct)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (block (result i32)
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (local.get $func)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (block (result i32)
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (ref.as_non_null
- ;; CHECK-NEXT: (local.get $struct)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (block (result i32)
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (ref.as_non_null
- ;; CHECK-NEXT: (local.get $func)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (i32.const 0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; NOMNL: (func $unneeded_is_bad_kinds (type $funcref_dataref_i31ref_=>_none) (param $func funcref) (param $struct dataref) (param $i31 i31ref)
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (block (result i32)
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (local.get $struct)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (i32.const 0)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (block (result i32)
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (local.get $func)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (i32.const 0)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (block (result i32)
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (ref.as_non_null
- ;; NOMNL-NEXT: (local.get $struct)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (i32.const 0)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (block (result i32)
- ;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (ref.as_non_null
- ;; NOMNL-NEXT: (local.get $func)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: (i32.const 0)
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- ;; NOMNL-NEXT: )
- (func $unneeded_is_bad_kinds
- (param $func (ref null func))
- (param $struct (ref null struct))
- (param $i31 (ref null i31))
- (drop
- (ref.is_func (local.get $struct))
- )
- (drop
- (ref.is_i31 (local.get $func))
- )
- ;; also check non-nullable types as inputs
- (drop
- (ref.is_func (ref.as_non_null (local.get $struct)))
- )
- (drop
- (ref.is_i31 (ref.as_non_null (local.get $func)))
- )
- )
-
;; ref.as_non_null is not needed on a non-nullable value, and if something is
;; a func we don't need that either etc., and can just return the value.
;; CHECK: (func $unneeded_as (type $ref|$struct|_ref|func|_ref|i31|_=>_none) (param $struct (ref $struct)) (param $func (ref func)) (param $i31 (ref i31))
@@ -2952,7 +2847,7 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (ref.is_func
+ ;; CHECK-NEXT: (ref.is_null
;; CHECK-NEXT: (local.get $x)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
@@ -2970,7 +2865,7 @@
;; NOMNL-NEXT: )
;; NOMNL-NEXT: )
;; NOMNL-NEXT: (drop
- ;; NOMNL-NEXT: (ref.is_func
+ ;; NOMNL-NEXT: (ref.is_null
;; NOMNL-NEXT: (local.get $x)
;; NOMNL-NEXT: )
;; NOMNL-NEXT: )
@@ -2994,7 +2889,7 @@
;; likewise ref.is and ref.test
(drop
(i32.and
- (ref.is_func
+ (ref.is_null
(local.get $x)
)
(i32.const 1)
diff --git a/test/lit/wat-kitchen-sink.wast b/test/lit/wat-kitchen-sink.wast
index 889b82fc4..00801b0c5 100644
--- a/test/lit/wat-kitchen-sink.wast
+++ b/test/lit/wat-kitchen-sink.wast
@@ -59,7 +59,7 @@
;; CHECK: (type $none_=>_i32_i64 (func (result i32 i64)))
- ;; CHECK: (type $anyref_=>_none (func (param anyref)))
+ ;; CHECK: (type $anyref_=>_i32 (func (param anyref) (result i32)))
;; CHECK: (type $eqref_eqref_=>_i32 (func (param eqref eqref) (result i32)))
@@ -1398,41 +1398,14 @@
return
)
- ;; CHECK: (func $ref-is (type $anyref_=>_none) (param $0 anyref)
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (ref.is_null
- ;; CHECK-NEXT: (local.get $0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (ref.is_func
- ;; CHECK-NEXT: (local.get $0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (ref.is_data
- ;; CHECK-NEXT: (local.get $0)
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: )
- ;; CHECK-NEXT: (drop
- ;; CHECK-NEXT: (ref.is_i31
- ;; CHECK-NEXT: (local.get $0)
- ;; CHECK-NEXT: )
+ ;; CHECK: (func $ref-is-null (type $anyref_=>_i32) (param $0 anyref) (result i32)
+ ;; CHECK-NEXT: (ref.is_null
+ ;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- (func $ref-is (param anyref)
+ (func $ref-is-null (param anyref) (result i32)
local.get 0
ref.is_null
- drop
- local.get 0
- ref.is_func
- drop
- local.get 0
- ref.is_data
- drop
- local.get 0
- ref.is_i31
- drop
)
;; CHECK: (func $ref-eq (type $eqref_eqref_=>_i32) (param $0 eqref) (param $1 eqref) (result i32)
diff --git a/test/passes/translate-to-fuzz_all-features_metrics_noprint.txt b/test/passes/translate-to-fuzz_all-features_metrics_noprint.txt
index 8006cb2a6..fb11af060 100644
--- a/test/passes/translate-to-fuzz_all-features_metrics_noprint.txt
+++ b/test/passes/translate-to-fuzz_all-features_metrics_noprint.txt
@@ -36,7 +36,7 @@ total
RefAs : 4
RefEq : 2
RefFunc : 9
- RefIs : 1
+ RefIsNull : 1
RefNull : 5
Return : 29
SIMDExtract : 3