diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/passes/dce_all-features.wast | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/test/lit/passes/dce_all-features.wast b/test/lit/passes/dce_all-features.wast index 8566b86f0..24bb751fc 100644 --- a/test/lit/passes/dce_all-features.wast +++ b/test/lit/passes/dce_all-features.wast @@ -1398,10 +1398,10 @@ (module ;; CHECK: (type $none_=>_ref|any| (func (result (ref any)))) - ;; CHECK: (func $foo (type $none_=>_ref|any|) (result (ref any)) + ;; CHECK: (func $br_on_non_null (type $none_=>_ref|any|) (result (ref any)) ;; CHECK-NEXT: (unreachable) ;; CHECK-NEXT: ) - (func $foo (result (ref any)) + (func $br_on_non_null (result (ref any)) (block $label$1 (result (ref any)) ;; this break has an unreachable input, and so it does not have a heap type ;; there, and no heap type to send on the branch. this tests we do not hit @@ -1414,4 +1414,17 @@ (unreachable) ) ) + + ;; CHECK: (func $br_on_cast_fail (type $none_=>_ref|any|) (result (ref any)) + ;; CHECK-NEXT: (unreachable) + ;; CHECK-NEXT: ) + (func $br_on_cast_fail (result (ref any)) + (block $label$1 (result (ref none)) + ;; Similar to the above, but using br_on_cast_fail. + (br_on_cast_fail $label$1 null struct + (unreachable) + ) + (unreachable) + ) + ) ) |