diff options
author | Alon Zakai <azakai@google.com> | 2024-01-25 13:26:04 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-25 13:26:04 -0800 |
commit | 5fb2137d7f1272b7b107f0413190ad94bb69a73b (patch) | |
tree | c455db5364de1616804a05f5edee0c54219119e9 /test/lit/passes/memory-packing_all-features.wast | |
parent | 662835a88f6f47d5b1451b453046ae80b4b0fc62 (diff) | |
download | binaryen-5fb2137d7f1272b7b107f0413190ad94bb69a73b.tar.gz binaryen-5fb2137d7f1272b7b107f0413190ad94bb69a73b.tar.bz2 binaryen-5fb2137d7f1272b7b107f0413190ad94bb69a73b.zip |
MemoryPacking: Ignore empty segments (#6243)
They might trap. Leave that for RemoveUnusedModuleElements.
Fixes #6230
Diffstat (limited to 'test/lit/passes/memory-packing_all-features.wast')
-rw-r--r-- | test/lit/passes/memory-packing_all-features.wast | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/lit/passes/memory-packing_all-features.wast b/test/lit/passes/memory-packing_all-features.wast index cf6c2aeef..42e21e32c 100644 --- a/test/lit/passes/memory-packing_all-features.wast +++ b/test/lit/passes/memory-packing_all-features.wast @@ -18,9 +18,12 @@ ;; CHECK: (memory $0 2048 2048) (memory $0 2048 2048) (import "env" "memoryBase" (global $memoryBase i32)) - (data (i32.const 4066) "") ;; empty + (data (i32.const 4066) "") ;; empty; leave it as is + ;; (remove-unused-module-elements handles such + ;; things, taking into account possible traps etc.) ) +;; CHECK: (data $0 (i32.const 4066) "") (module ;; CHECK: (import "env" "memoryBase" (global $memoryBase i32)) @@ -2319,6 +2322,8 @@ (memory $0 1 1 shared) (data (i32.const 0) "") (data "foo") + ;; CHECK: (data $0 (i32.const 0) "") + ;; CHECK: (data $1 "foo") ;; CHECK: (func $0 (type $0) |