summaryrefslogtreecommitdiff
path: root/src/ir/effects.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/effects.h')
-rw-r--r--src/ir/effects.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ir/effects.h b/src/ir/effects.h
index f6c87a4e5..9d6e90936 100644
--- a/src/ir/effects.h
+++ b/src/ir/effects.h
@@ -392,8 +392,10 @@ struct EffectAnalyzer
}
}
void visitDataDrop(DataDrop* curr) {
- // prevent reordering with memory.init
- readsMemory = true;
+ // data.drop does not actually write memory, but it does alter the size of
+ // a segment, which can be noticeable later by memory.init, so we need to
+ // mark it as having a global side effect of some kind.
+ writesMemory = true;
if (!ignoreImplicitTraps) {
implicitTrap = true;
}