diff options
-rw-r--r-- | src/passes/Precompute.cpp | 12 | ||||
-rw-r--r-- | test/passes/precompute_all-features.txt (renamed from test/passes/precompute_enable-simd.txt) | 27 | ||||
-rw-r--r-- | test/passes/precompute_all-features.wast (renamed from test/passes/precompute_enable-simd.wast) | 28 |
3 files changed, 65 insertions, 2 deletions
diff --git a/src/passes/Precompute.cpp b/src/passes/Precompute.cpp index 50c17510f..565809ddb 100644 --- a/src/passes/Precompute.cpp +++ b/src/passes/Precompute.cpp @@ -122,6 +122,18 @@ public: Flow visitAtomicNotify(AtomicNotify *curr) { return Flow(NOTPRECOMPUTABLE_FLOW); } + Flow visitMemoryInit(MemoryInit *curr) { + return Flow(NOTPRECOMPUTABLE_FLOW); + } + Flow visitDataDrop(DataDrop *curr) { + return Flow(NOTPRECOMPUTABLE_FLOW); + } + Flow visitMemoryCopy(MemoryCopy *curr) { + return Flow(NOTPRECOMPUTABLE_FLOW); + } + Flow visitMemoryFill(MemoryFill *curr) { + return Flow(NOTPRECOMPUTABLE_FLOW); + } Flow visitHost(Host *curr) { return Flow(NOTPRECOMPUTABLE_FLOW); } diff --git a/test/passes/precompute_enable-simd.txt b/test/passes/precompute_all-features.txt index f7f58f58f..a6eae53d3 100644 --- a/test/passes/precompute_enable-simd.txt +++ b/test/passes/precompute_all-features.txt @@ -4,7 +4,8 @@ (type $2 (func)) (type $3 (func (result f64))) (type $4 (func (result v128))) - (memory $0 0) + (memory $0 512 512) + (data (i32.const 0) "passive") (global $global i32 (i32.const 1)) (global $global-mut (mut i32) (i32.const 2)) (func $x (; 0 ;) (type $0) (param $x i32) @@ -224,4 +225,28 @@ ) ) ) + (func $no-memory-init-precompute (; 13 ;) (type $2) + (memory.init 0 + (i32.const 512) + (i32.const 0) + (i32.const 12) + ) + ) + (func $no-data-drop-precompute (; 14 ;) (type $2) + (data.drop 0) + ) + (func $no-memory-copy-precompute (; 15 ;) (type $2) + (memory.copy + (i32.const 512) + (i32.const 0) + (i32.const 12) + ) + ) + (func $no-memory-fill-precompute (; 16 ;) (type $2) + (memory.fill + (i32.const 512) + (i32.const 0) + (i32.const 12) + ) + ) ) diff --git a/test/passes/precompute_enable-simd.wast b/test/passes/precompute_all-features.wast index d6b1cc1b7..28c570b7a 100644 --- a/test/passes/precompute_enable-simd.wast +++ b/test/passes/precompute_all-features.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 512 512 + (data passive "hello!") + ) (type $0 (func (param i32))) (global $global i32 (i32.const 1)) (global $global-mut (mut i32) (i32.const 2)) @@ -318,4 +320,28 @@ ) ) ) + (func $no-memory-init-precompute + (memory.init 0 + (i32.const 512) + (i32.const 0) + (i32.const 12) + ) + ) + (func $no-data-drop-precompute + (data.drop 0) + ) + (func $no-memory-copy-precompute + (memory.copy + (i32.const 512) + (i32.const 0) + (i32.const 12) + ) + ) + (func $no-memory-fill-precompute + (memory.fill + (i32.const 512) + (i32.const 0) + (i32.const 12) + ) + ) ) |