Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/passes/LLVMMemoryCopyFillLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ struct LLVMMemoryCopyFillLowering
module->getFunction(memFillFuncName)->body = body;
}

void VisitTableCopy(TableCopy* curr) {
void visitTableCopy(TableCopy* curr) {
Fatal() << "table.copy instruction found. Memory copy lowering is not "
"designed to work on modules with bulk table operations";
}
void VisitTableFill(TableCopy* curr) {
void visitTableFill(TableFill* curr) {
Fatal() << "table.fill instruction found. Memory copy lowering is not "
"designed to work on modules with bulk table operations";
}
Expand Down
14 changes: 14 additions & 0 deletions test/lit/passes/memory-copy-fill-lowering-table-error.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
;; The llvm-memory-copy-fill-lowering pass should Fatal() when a module
;; contains table.copy, since it does not support bulk table operations.

;; RUN: not wasm-opt --enable-bulk-memory %s --llvm-memory-copy-fill-lowering 2>&1 | filecheck %s
;; CHECK: table.copy instruction found

(module
(memory 0)
(table $t 1 funcref)
(func $test
(memory.copy (i32.const 0) (i32.const 0) (i32.const 0))
(table.copy $t $t (i32.const 0) (i32.const 0) (i32.const 0))
)
)
14 changes: 14 additions & 0 deletions test/lit/passes/memory-copy-fill-lowering-table-fill-error.wast
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
;; The llvm-memory-copy-fill-lowering pass should Fatal() when a module
;; contains table.fill, since it does not support bulk table operations.

;; RUN: not wasm-opt --enable-bulk-memory --enable-reference-types %s --llvm-memory-copy-fill-lowering 2>&1 | filecheck %s
;; CHECK: table.fill instruction found

(module
(memory 0)
(table $t 1 funcref)
(func $test
(memory.copy (i32.const 0) (i32.const 0) (i32.const 0))
(table.fill $t (i32.const 0) (ref.null func) (i32.const 0))
)
)
Loading