diff options
Diffstat (limited to 'test/lit/passes/optimize-instructions-gc-tnh.wast')
-rw-r--r-- | test/lit/passes/optimize-instructions-gc-tnh.wast | 31 |
1 files changed, 3 insertions, 28 deletions
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)) |