summaryrefslogtreecommitdiff
path: root/src/passes/MemoryPacking.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/MemoryPacking.cpp')
-rw-r--r--src/passes/MemoryPacking.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/passes/MemoryPacking.cpp b/src/passes/MemoryPacking.cpp
index 640207fc7..c6b8a281a 100644
--- a/src/passes/MemoryPacking.cpp
+++ b/src/passes/MemoryPacking.cpp
@@ -595,7 +595,8 @@ void MemoryPacking::createReplacements(Module* module,
// Create new memory.init or memory.fill
if (range.isZero) {
- Expression* value = builder.makeConst(Literal::makeZero(Type::i32));
+ Expression* value =
+ builder.makeConst(Literal::makeSingleZero(Type::i32));
appendResult(builder.makeMemoryFill(dest, value, size));
} else {
size_t offsetBytes = std::max(start, range.start) - range.start;