diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/i31-new.wast | 18 | ||||
-rw-r--r-- | test/lit/passes/simplify-globals-single_use.wast | 22 | ||||
-rw-r--r-- | test/lit/passes/stack-ir-non-nullable.wast | 56 | ||||
-rw-r--r-- | test/lit/passes/type-generalizing.wast | 10 |
4 files changed, 44 insertions, 62 deletions
diff --git a/test/lit/i31-new.wast b/test/lit/i31-new.wast deleted file mode 100644 index 9d47b3ec9..000000000 --- a/test/lit/i31-new.wast +++ /dev/null @@ -1,18 +0,0 @@ -;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. - -;; Check that we still parse the legacy i31.new instruction. - -;; RUN: wasm-opt %s -all -S -o - | filecheck %s - -(module - ;; CHECK: (func $test (type $0) (result i31ref) - ;; CHECK-NEXT: (ref.i31 - ;; CHECK-NEXT: (i32.const 0) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: ) - (func $test (result i31ref) - (i31.new - (i32.const 0) - ) - ) -) diff --git a/test/lit/passes/simplify-globals-single_use.wast b/test/lit/passes/simplify-globals-single_use.wast index daba2588d..768ac6f86 100644 --- a/test/lit/passes/simplify-globals-single_use.wast +++ b/test/lit/passes/simplify-globals-single_use.wast @@ -17,7 +17,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: )) (global $single-use anyref (struct.new $A - (i31.new + (ref.i31 (i32.const 42) ) )) @@ -59,7 +59,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: )) (global $single-use anyref (struct.new $A - (i31.new + (ref.i31 (i32.const 42) ) )) @@ -85,7 +85,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: )) (global $single-use anyref (struct.new $A - (i31.new + (ref.i31 (i32.const 42) ) )) @@ -131,7 +131,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: )) (global $single-use anyref (struct.new $A - (i31.new + (ref.i31 (i32.const 42) ) )) @@ -160,7 +160,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: )) (global $single-use anyref (struct.new $A - (i31.new + (ref.i31 (i32.const 42) ) )) @@ -188,7 +188,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: )) (global $single-use1 anyref (struct.new $A - (i31.new + (ref.i31 (i32.const 42) ) )) @@ -199,7 +199,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: )) (global $single-use2 anyref (struct.new $A - (i31.new + (ref.i31 (i32.const 1337) ) )) @@ -217,7 +217,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: )) (global $single-use3 anyref (struct.new $A - (i31.new + (ref.i31 (i32.const 99999) ) )) @@ -250,7 +250,7 @@ ;; CHECK-NEXT: (ref.null none) ;; CHECK-NEXT: )) (global $single-use1 anyref (struct.new $A - (i31.new + (ref.i31 (i32.const 42) ) (ref.null any) @@ -264,7 +264,7 @@ ;; CHECK-NEXT: )) (global $single-use2 anyref (struct.new $A (ref.null any) - (i31.new + (ref.i31 (i32.const 1337) ) )) @@ -297,7 +297,7 @@ ;; CHECK: (global $single-use1 anyref (ref.i31 ;; CHECK-NEXT: (i32.const 42) ;; CHECK-NEXT: )) - (global $single-use1 anyref (i31.new + (global $single-use1 anyref (ref.i31 (i32.const 42) )) diff --git a/test/lit/passes/stack-ir-non-nullable.wast b/test/lit/passes/stack-ir-non-nullable.wast index c3309d65a..508fe574f 100644 --- a/test/lit/passes/stack-ir-non-nullable.wast +++ b/test/lit/passes/stack-ir-non-nullable.wast @@ -37,20 +37,20 @@ (if (ref.eq (local.get $temp) - (i31.new + (ref.i31 (i32.const 0) ) ) (then (local.set $temp - (i31.new + (ref.i31 (i32.const 1) ) ) ) (else (local.set $temp - (i31.new + (ref.i31 (i32.const 2) ) ) @@ -86,20 +86,20 @@ (if (ref.eq (local.get $temp) - (i31.new + (ref.i31 (i32.const 0) ) ) (then (local.set $temp - (i31.new + (ref.i31 (i32.const 1) ) ) ) (else (local.set $temp - (i31.new + (ref.i31 (i32.const 2) ) ) @@ -135,20 +135,20 @@ (if (ref.eq (local.get $temp) - (i31.new + (ref.i31 (i32.const 0) ) ) (then (local.set $temp - (i31.new + (ref.i31 (i32.const 1) ) ) ) (else (local.set $temp - (i31.new + (ref.i31 (i32.const 2) ) ) @@ -191,20 +191,20 @@ (if (ref.eq (local.get $temp) - (i31.new + (ref.i31 (i32.const 0) ) ) (then (local.set $temp - (i31.new + (ref.i31 (i32.const 1) ) ) ) (else (local.set $temp - (i31.new + (ref.i31 (i32.const 2) ) ) @@ -245,20 +245,20 @@ (if (ref.eq (local.get $temp) - (i31.new + (ref.i31 (i32.const 0) ) ) (then (local.set $temp - (i31.new + (ref.i31 (i32.const 1) ) ) ) (else (local.set $temp - (i31.new + (ref.i31 (i32.const 2) ) ) @@ -296,20 +296,20 @@ (if (ref.eq (local.get $temp) - (i31.new + (ref.i31 (i32.const 0) ) ) (then (local.set $temp - (i31.new + (ref.i31 (i32.const 1) ) ) ) (else (local.set $temp - (i31.new + (ref.i31 (i32.const 2) ) ) @@ -345,20 +345,20 @@ (if (ref.eq (local.get $temp) - (i31.new + (ref.i31 (i32.const 0) ) ) (then (local.set $temp - (i31.new + (ref.i31 (i32.const 1) ) ) ) (else (local.set $temp - (i31.new + (ref.i31 (i32.const 2) ) ) @@ -410,7 +410,7 @@ (tuple.extract 2 1 (local.get $temp) ) - (i31.new + (ref.i31 (i32.const 1) ) ) @@ -418,7 +418,7 @@ (local.set $temp (tuple.make 2 (i32.const 2) - (i31.new + (ref.i31 (i32.const 3) ) ) @@ -428,7 +428,7 @@ (local.set $temp (tuple.make 2 (i32.const 4) - (i31.new + (ref.i31 (i32.const 5) ) ) @@ -482,7 +482,7 @@ (tuple.extract 2 1 (local.get $temp) ) - (i31.new + (ref.i31 (i32.const 1) ) ) @@ -490,7 +490,7 @@ (local.set $temp (tuple.make 2 (i32.const 2) - (i31.new + (ref.i31 (i32.const 3) ) ) @@ -500,7 +500,7 @@ (local.set $temp (tuple.make 2 (i32.const 4) - (i31.new + (ref.i31 (i32.const 5) ) ) @@ -1015,7 +1015,7 @@ (if (ref.eq (local.get $temp) - (i31.new + (ref.i31 (i32.const 0) ) ) diff --git a/test/lit/passes/type-generalizing.wast b/test/lit/passes/type-generalizing.wast index 344509794..e9c92ff86 100644 --- a/test/lit/passes/type-generalizing.wast +++ b/test/lit/passes/type-generalizing.wast @@ -270,7 +270,7 @@ (local $var i31ref) ;; Require that (ref i31) <: typeof($var). (local.set $var - (i31.new + (ref.i31 (i32.const 0) ) ) @@ -405,7 +405,7 @@ (drop (local.tee $dest (local.tee $var - (i31.new + (ref.i31 (i32.const 0) ) ) @@ -439,7 +439,7 @@ (local $nonnullable (ref i31)) ;; Initialize the non-nullable local for validation purposes. (local.set $nonnullable - (i31.new + (ref.i31 (i32.const 0) ) ) @@ -819,7 +819,7 @@ (func $extern-convert-any-nullable (result externref) (local $var (ref i31)) (local.set $var - (i31.new + (ref.i31 (i32.const 0) ) ) @@ -843,7 +843,7 @@ (func $extern-convert-any-non-nullable (result (ref extern)) (local $var (ref i31)) (local.set $var - (i31.new + (ref.i31 (i32.const 0) ) ) |