diff options
Diffstat (limited to 'test/lit/passes/optimize-instructions-gc.wast')
-rw-r--r-- | test/lit/passes/optimize-instructions-gc.wast | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/test/lit/passes/optimize-instructions-gc.wast b/test/lit/passes/optimize-instructions-gc.wast index 631697e27..3ecd83d03 100644 --- a/test/lit/passes/optimize-instructions-gc.wast +++ b/test/lit/passes/optimize-instructions-gc.wast @@ -14,14 +14,12 @@ (field $i64 (mut i64)) )) - ;; CHECK: (type $array (array (mut i8))) - ;; CHECK: (type $A (struct (field i32))) - ;; NOMNL: (type $array (array (mut i8))) - ;; NOMNL: (type $A (struct (field i32))) (type $A (struct (field i32))) + ;; CHECK: (type $array (array (mut i8))) + ;; NOMNL: (type $array (array (mut i8))) (type $array (array (mut i8))) ;; CHECK: (type $B (struct_subtype (field i32) (field i32) (field f32) $A)) @@ -3045,27 +3043,17 @@ ) ) - ;; CHECK: (func $as_of_unreachable (type $none_=>_ref|data|) (result (ref data)) - ;; CHECK-NEXT: (block ;; (replaces something unreachable we can't emit) - ;; CHECK-NEXT: (drop - ;; CHECK-NEXT: (unreachable) - ;; CHECK-NEXT: ) - ;; CHECK-NEXT: (unreachable) - ;; CHECK-NEXT: ) + ;; CHECK: (func $as_of_unreachable (type $none_=>_ref|$A|) (result (ref $A)) + ;; CHECK-NEXT: (unreachable) ;; CHECK-NEXT: ) - ;; NOMNL: (func $as_of_unreachable (type $none_=>_ref|data|) (result (ref data)) - ;; NOMNL-NEXT: (block ;; (replaces something unreachable we can't emit) - ;; NOMNL-NEXT: (drop - ;; NOMNL-NEXT: (unreachable) - ;; NOMNL-NEXT: ) - ;; NOMNL-NEXT: (unreachable) - ;; NOMNL-NEXT: ) + ;; NOMNL: (func $as_of_unreachable (type $none_=>_ref|$A|) (result (ref $A)) + ;; NOMNL-NEXT: (unreachable) ;; NOMNL-NEXT: ) - (func $as_of_unreachable (result (ref data)) + (func $as_of_unreachable (result (ref $A)) ;; The cast will definitely fail, so we can turn it into an unreachable. The ;; ref.as must then ignore the unreachable input and not error on trying to ;; infer anything about it. - (ref.as_data + (ref.as_non_null (ref.cast $A (ref.null none) ) |