diff options
Diffstat (limited to 'test/lit/passes')
-rw-r--r-- | test/lit/passes/dae-gc.wast | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/lit/passes/dae-gc.wast b/test/lit/passes/dae-gc.wast index 87e480cc8..fe4b346ea 100644 --- a/test/lit/passes/dae-gc.wast +++ b/test/lit/passes/dae-gc.wast @@ -2,6 +2,8 @@ ;; RUN: wasm-opt %s -all --dae -S -o - | filecheck %s (module + (type ${} (struct)) + ;; CHECK: (func $foo ;; CHECK-NEXT: (call $bar) ;; CHECK-NEXT: ) @@ -46,4 +48,22 @@ (unreachable) ) ) + ;; a function that gets an rtt that is never used. we cannot create a local for + ;; that parameter, as it is not defaultable, so do not remove the parameter. + ;; CHECK: (func $get-rtt (param $0 (rtt ${})) + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: ) + (func $get-rtt (param $0 (rtt ${})) + (nop) + ) + ;; CHECK: (func $send-rtt + ;; CHECK-NEXT: (call $get-rtt + ;; CHECK-NEXT: (rtt.canon ${}) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $send-rtt + (call $get-rtt + (rtt.canon ${}) + ) + ) ) |