From 5fefa9361a0d958dd7977907eaf1ae8facf3ba48 Mon Sep 17 00:00:00 2001 From: Ashley Nelson Date: Tue, 3 Jan 2023 12:37:35 -0800 Subject: Maintain first memory import/export in Multi-Memory Lowering Pass (#5363) This PR maintains the first memory's import/export in the single combined memory after multi-memories are lowered. --- test/lit/wasm-split/multi-memory-lowering-import-error.wast | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/lit/wasm-split/multi-memory-lowering-import-error.wast (limited to 'test/lit/wasm-split/multi-memory-lowering-import-error.wast') diff --git a/test/lit/wasm-split/multi-memory-lowering-import-error.wast b/test/lit/wasm-split/multi-memory-lowering-import-error.wast new file mode 100644 index 000000000..f697db40b --- /dev/null +++ b/test/lit/wasm-split/multi-memory-lowering-import-error.wast @@ -0,0 +1,8 @@ +;; RUN: not wasm-opt %s --multi-memory-lowering -all 2>&1 | filecheck %s + +(module + (memory $memory1 1) + (import "env" "mem" (memory $memory2 1 1)) +) + +;; CHECK: MultiMemoryLowering: only the first memory can be imported -- cgit v1.2.3