Skip to content

Commit c35bdde

Browse files
Fix precompute optimizing atomic.fence out (#9379)
Fixes #9369
1 parent 37d0906 commit c35bdde

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎src/wasm-interpreter.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3124,6 +3124,7 @@ class ConstantExpressionRunner : public ExpressionRunner<SubType> {
31243124
}
31253125
Flow visitAtomicWait(AtomicWait* curr) { return Flow(NONCONSTANT_FLOW); }
31263126
Flow visitAtomicNotify(AtomicNotify* curr) { return Flow(NONCONSTANT_FLOW); }
3127+
Flow visitAtomicFence(AtomicFence* curr) { return Flow(NONCONSTANT_FLOW); }
31273128
Flow visitStructWait(StructWait* curr) { return Flow(NONCONSTANT_FLOW); }
31283129
Flow visitWaitqueueNew(WaitqueueNew* curr) { return Flow(NONCONSTANT_FLOW); }
31293130
Flow visitWaitqueueNotify(WaitqueueNotify* curr) {

‎test/lit/passes/precompute_all-features.wast‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,4 +810,13 @@
810810
)
811811
)
812812
)
813+
814+
;; CHECK: (func $atomic-fence (type $1)
815+
;; CHECK-NEXT: (atomic.fence)
816+
;; CHECK-NEXT: (atomic.fence acqrel)
817+
;; CHECK-NEXT: )
818+
(func $atomic-fence
819+
(atomic.fence)
820+
(atomic.fence acqrel)
821+
)
813822
)

0 commit comments

Comments
 (0)