File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -215,6 +215,7 @@ class PrecomputingExpressionRunner
215215 }
216216 // ArrayLen is not disallowed here as it is an immutable property.
217217 Flow visitArrayCopy (ArrayCopy* curr) { return Flow (NONCONSTANT_FLOW); }
218+ Flow visitArrayStore (ArrayStore* curr) { return Flow (NONCONSTANT_FLOW); }
218219
219220 // Generates heap info for a heap-allocating expression.
220221 Flow getGCAllocation (Expression* curr, std::function<Flow()> visitFunc) {
Original file line number Diff line number Diff line change 1+ ;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.
2+
3+ ;; RUN: foreach %s %t wasm-opt --precompute-propagate -all -S -o - | filecheck %s
4+
5+ (module
6+ ;; CHECK: (type $array (array (mut i8)))
7+ (type $array (array (mut i8 )))
8+
9+ ;; CHECK: (func $array.store (type $1) (param $x (ref $array))
10+ ;; CHECK-NEXT: (i64.store32 (type $array)
11+ ;; CHECK-NEXT: (local.get $x)
12+ ;; CHECK-NEXT: (i32.const 0)
13+ ;; CHECK-NEXT: (i64.const 1)
14+ ;; CHECK-NEXT: )
15+ ;; CHECK-NEXT: )
16+ (func $array.store (param $x (ref $array ))
17+ ;; ArrayStore operations cannot be removed.
18+ (i64.store32 (type $array )
19+ (local.get $x )
20+ (i32.const 0 )
21+ (i64.const 1 )
22+ )
23+ )
24+ )
You can’t perform that action at this time.
0 commit comments