diff options
author | Alon Zakai <azakai@google.com> | 2023-04-05 12:53:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-05 19:53:50 +0000 |
commit | 04d451f3aadaf4d364e001fa9a849ef57a100a9e (patch) | |
tree | 3f82300c68a64df93b455ce19a9969d2d3c5dbe6 /test | |
parent | d21b6d04ff8020d76636ee0e09a8ccede9c0bf39 (diff) | |
download | binaryen-04d451f3aadaf4d364e001fa9a849ef57a100a9e.tar.gz binaryen-04d451f3aadaf4d364e001fa9a849ef57a100a9e.tar.bz2 binaryen-04d451f3aadaf4d364e001fa9a849ef57a100a9e.zip |
RemoveUnusedModuleElements: Add SIMD support for memory operations (#5632)
Fixes #5629
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/passes/remove-unused-module-elements_all-features.wast | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/lit/passes/remove-unused-module-elements_all-features.wast b/test/lit/passes/remove-unused-module-elements_all-features.wast index d5c394e30..c8b4a57df 100644 --- a/test/lit/passes/remove-unused-module-elements_all-features.wast +++ b/test/lit/passes/remove-unused-module-elements_all-features.wast @@ -722,3 +722,42 @@ ) ) ) +;; SIMD operations can keep memories alive +(module + ;; CHECK: (type $none_=>_none (func)) + + ;; CHECK: (memory $A 1 1) + (memory $A 1 1) + ;; CHECK: (memory $B 1 1) + (memory $B 1 1) + (memory $C-unused 1 1) + + (func "func" + (drop + (v128.load64_splat $A + (i32.const 0) + ) + ) + (drop + (v128.load16_lane $B 0 + (i32.const 0) + (v128.const i32x4 0 0 0 0) + ) + ) + ) +) +;; CHECK: (export "func" (func $0)) + +;; CHECK: (func $0 (type $none_=>_none) +;; CHECK-NEXT: (drop +;; CHECK-NEXT: (v128.load64_splat $A +;; CHECK-NEXT: (i32.const 0) +;; CHECK-NEXT: ) +;; CHECK-NEXT: ) +;; CHECK-NEXT: (drop +;; CHECK-NEXT: (v128.load16_lane $B 0 +;; CHECK-NEXT: (i32.const 0) +;; CHECK-NEXT: (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000) +;; CHECK-NEXT: ) +;; CHECK-NEXT: ) +;; CHECK-NEXT: ) |