diff options
Diffstat (limited to 'test/lit/passes/optimize-instructions-gc-iit.wast')
-rw-r--r-- | test/lit/passes/optimize-instructions-gc-iit.wast | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/lit/passes/optimize-instructions-gc-iit.wast b/test/lit/passes/optimize-instructions-gc-iit.wast index ce93b5d04..904925940 100644 --- a/test/lit/passes/optimize-instructions-gc-iit.wast +++ b/test/lit/passes/optimize-instructions-gc-iit.wast @@ -41,7 +41,7 @@ ;; CHECK-NEXT: (local.get $child) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (ref.cast_static $child + ;; CHECK-NEXT: (ref.cast null $child ;; CHECK-NEXT: (local.get $parent) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -62,7 +62,7 @@ ;; NOMNL-NEXT: (local.get $child) ;; NOMNL-NEXT: ) ;; NOMNL-NEXT: (drop - ;; NOMNL-NEXT: (ref.cast_static $child + ;; NOMNL-NEXT: (ref.cast null $child ;; NOMNL-NEXT: (local.get $parent) ;; NOMNL-NEXT: ) ;; NOMNL-NEXT: ) @@ -83,7 +83,7 @@ ;; NOMNL-TNH-NEXT: (local.get $child) ;; NOMNL-TNH-NEXT: ) ;; NOMNL-TNH-NEXT: (drop - ;; NOMNL-TNH-NEXT: (ref.cast_static $child + ;; NOMNL-TNH-NEXT: (ref.cast null $child ;; NOMNL-TNH-NEXT: (local.get $parent) ;; NOMNL-TNH-NEXT: ) ;; NOMNL-TNH-NEXT: ) @@ -104,13 +104,13 @@ ;; a cast of parent to parent. We can optimize this as the new type will be ;; valid. (drop - (ref.cast_static $parent + (ref.cast null $parent (local.get $parent) ) ) ;; a cast of child to a supertype: again, we replace with a valid type. (drop - (ref.cast_static $parent + (ref.cast null $parent (local.get $child) ) ) @@ -118,13 +118,13 @@ ;; $child with one that is not equal or more specific, like $parent, so we ;; cannot optimize here. (drop - (ref.cast_static $child + (ref.cast null $child (local.get $parent) ) ) ;; a cast of child to an unrelated type: it will trap anyhow (drop - (ref.cast_static $other + (ref.cast null $other (local.get $child) ) ) @@ -138,7 +138,7 @@ ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (ref.cast_static $parent + ;; CHECK-NEXT: (ref.cast null $parent ;; CHECK-NEXT: (unreachable) ;; CHECK-NEXT: ) ;; CHECK-NEXT: ) @@ -151,7 +151,7 @@ ;; NOMNL-NEXT: ) ;; NOMNL-NEXT: ) ;; NOMNL-NEXT: (drop - ;; NOMNL-NEXT: (ref.cast_static $parent + ;; NOMNL-NEXT: (ref.cast null $parent ;; NOMNL-NEXT: (unreachable) ;; NOMNL-NEXT: ) ;; NOMNL-NEXT: ) @@ -164,7 +164,7 @@ ;; NOMNL-TNH-NEXT: ) ;; NOMNL-TNH-NEXT: ) ;; NOMNL-TNH-NEXT: (drop - ;; NOMNL-TNH-NEXT: (ref.cast_static $parent + ;; NOMNL-TNH-NEXT: (ref.cast null $parent ;; NOMNL-TNH-NEXT: (unreachable) ;; NOMNL-TNH-NEXT: ) ;; NOMNL-TNH-NEXT: ) @@ -174,7 +174,7 @@ ;; optimizing this cast away requires reordering. (drop - (ref.cast_static $parent + (ref.cast null $parent (block (result (ref $parent)) (call $foo) (local.get $parent) @@ -184,7 +184,7 @@ ;; ignore unreachability (drop - (ref.cast_static $parent + (ref.cast null $parent (unreachable) ) ) @@ -206,11 +206,11 @@ ;; NOMNL-TNH-NEXT: ) ;; NOMNL-TNH-NEXT: ) (func $ref-eq-ref-cast (param $x eqref) - ;; we can look through a ref.cast if we ignore traps + ;; we can look through a ref.cast null if we ignore traps (drop (ref.eq (local.get $x) - (ref.cast_static $parent + (ref.cast null $parent (local.get $x) ) ) @@ -280,7 +280,7 @@ ;; NOMNL-TNH-NEXT: ) (func $test (param $C (ref $C)) (result anyref) (struct.get $B 0 - (ref.cast_static $B ;; Try to cast a $C to its parent, $B. That always + (ref.cast null $B ;; Try to cast a $C to its parent, $B. That always ;; works, so the cast can be removed. ;; Then once the cast is removed, the outer struct.get ;; will have a reference with a different type, |