blob: 6bbadc9d2cdcb7bfd28f68923ac1cd01d8b245c0 [file] [edit]
;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.
;; RUN: wasm-split %s --disable-reference-types --split-funcs=split -g -o1 %t.1.wasm -o2 %t.2.wasm
;; RUN: wasm-dis %t.1.wasm | filecheck %s --check-prefix PRIMARY
;; Regression test for a bug that we incorrectly created a trampoline for
;; (elem $e0 (i32.const 0) $split) segment, even though it was one of dispatch
;; segments.
(module
;; PRIMARY: (type $0 (func))
(type $0 (func))
;; PRIMARY: (table $dispatch_table 2 2 funcref)
(table $dispatch_table 2 2 funcref)
;; PRIMARY: (elem $e0 (i32.const 0) $placeholder_0)
;; PRIMARY: (elem $e1 (i32.const 1) $keep)
;; PRIMARY: (export "dispatch_table" (table $dispatch_table))
(export "dispatch_table" (table $dispatch_table))
(elem $e0 (i32.const 0) $split)
(elem $e1 (i32.const 1) $keep)
;; PRIMARY: (func $keep
;; PRIMARY-NEXT: (nop)
;; PRIMARY-NEXT: )
(func $keep (type $0)
(nop)
)
(func $split (type $0)
(nop)
)
)