diff options
Diffstat (limited to 'test/lit/passes/optimize-instructions-gc-tnh.wast')
-rw-r--r-- | test/lit/passes/optimize-instructions-gc-tnh.wast | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/test/lit/passes/optimize-instructions-gc-tnh.wast b/test/lit/passes/optimize-instructions-gc-tnh.wast index 948e03296..502590cde 100644 --- a/test/lit/passes/optimize-instructions-gc-tnh.wast +++ b/test/lit/passes/optimize-instructions-gc-tnh.wast @@ -86,9 +86,7 @@ ;; TNH: (func $ref.is (type $eqref_=>_i32) (param $a eqref) (result i32) ;; TNH-NEXT: (drop ;; TNH-NEXT: (ref.cast $struct - ;; TNH-NEXT: (ref.as_data - ;; TNH-NEXT: (local.get $a) - ;; TNH-NEXT: ) + ;; TNH-NEXT: (local.get $a) ;; TNH-NEXT: ) ;; TNH-NEXT: ) ;; TNH-NEXT: (i32.const 0) @@ -96,9 +94,7 @@ ;; NO_TNH: (func $ref.is (type $eqref_=>_i32) (param $a eqref) (result i32) ;; NO_TNH-NEXT: (drop ;; NO_TNH-NEXT: (ref.cast $struct - ;; NO_TNH-NEXT: (ref.as_data - ;; NO_TNH-NEXT: (local.get $a) - ;; NO_TNH-NEXT: ) + ;; NO_TNH-NEXT: (local.get $a) ;; NO_TNH-NEXT: ) ;; NO_TNH-NEXT: ) ;; NO_TNH-NEXT: (i32.const 0) @@ -140,23 +136,23 @@ ) ) - ;; TNH: (func $ref.is_func (type $anyref_=>_i32) (param $a anyref) (result i32) + ;; TNH: (func $ref.is_func (type $funcref_=>_i32) (param $a funcref) (result i32) ;; TNH-NEXT: (drop - ;; TNH-NEXT: (ref.as_func + ;; TNH-NEXT: (ref.as_non_null ;; TNH-NEXT: (local.get $a) ;; TNH-NEXT: ) ;; TNH-NEXT: ) ;; TNH-NEXT: (i32.const 1) ;; TNH-NEXT: ) - ;; NO_TNH: (func $ref.is_func (type $anyref_=>_i32) (param $a anyref) (result i32) + ;; NO_TNH: (func $ref.is_func (type $funcref_=>_i32) (param $a funcref) (result i32) ;; NO_TNH-NEXT: (drop - ;; NO_TNH-NEXT: (ref.as_func + ;; NO_TNH-NEXT: (ref.as_non_null ;; NO_TNH-NEXT: (local.get $a) ;; NO_TNH-NEXT: ) ;; NO_TNH-NEXT: ) ;; NO_TNH-NEXT: (i32.const 1) ;; NO_TNH-NEXT: ) - (func $ref.is_func (param $a (ref null any)) (result i32) + (func $ref.is_func (param $a funcref) (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). |