summaryrefslogtreecommitdiff
path: root/test/passes/remove-unused-names_merge-blocks.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/passes/remove-unused-names_merge-blocks.wast')
-rw-r--r--test/passes/remove-unused-names_merge-blocks.wast37
1 files changed, 36 insertions, 1 deletions
diff --git a/test/passes/remove-unused-names_merge-blocks.wast b/test/passes/remove-unused-names_merge-blocks.wast
index 346dc78f8..c249a34dd 100644
--- a/test/passes/remove-unused-names_merge-blocks.wast
+++ b/test/passes/remove-unused-names_merge-blocks.wast
@@ -1,5 +1,5 @@
(module
- (memory 256 256)
+ (memory 256 256 shared)
(type $i (func (param i32)))
(type $ii (func (param i32 i32)))
(type $iii (func (param i32 i32 i32)))
@@ -885,6 +885,41 @@
(unreachable)
)
)
+ (func $atomics (type $3)
+ (drop
+ (i32.atomic.rmw.cmpxchg ;; mergeblock logic should be same as select
+ (block $block0 (result i32)
+ (drop
+ (i32.const 10)
+ )
+ (i32.const 20)
+ )
+ (block $block1 (result i32)
+ (drop
+ (i32.const 30)
+ )
+ (i32.const 40)
+ )
+ (block $block2 (result i32)
+ (drop
+ (i32.const 50)
+ )
+ (i32.const 60)
+ )
+ )
+ )
+ (drop
+ (i32.atomic.rmw.add ;; atomicrmw is like a binary
+ (block $block1 (result i32)
+ (drop
+ (i32.const 10)
+ )
+ (i32.const 20)
+ )
+ (i32.const 30)
+ )
+ )
+ )
(func $mix-select (param $x i32)
(drop
(select