summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/O1.txt14
-rw-r--r--test/passes/O1.wast19
2 files changed, 33 insertions, 0 deletions
diff --git a/test/passes/O1.txt b/test/passes/O1.txt
new file mode 100644
index 000000000..09dd3d056
--- /dev/null
+++ b/test/passes/O1.txt
@@ -0,0 +1,14 @@
+(module
+ (type $0 (func (result i32)))
+ (memory $0 1 1)
+ (global $global$0 (mut i32) (i32.const 10))
+ (export "foo" (func $0))
+ (func $0 (; 0 ;) (type $0) (result i32)
+ (global.set $global$0
+ (i32.const 0)
+ )
+ (i32.load align=1
+ (i32.const 4)
+ )
+ )
+)
diff --git a/test/passes/O1.wast b/test/passes/O1.wast
new file mode 100644
index 000000000..87b06b063
--- /dev/null
+++ b/test/passes/O1.wast
@@ -0,0 +1,19 @@
+(module
+ (memory $0 1 1)
+ (global $global$0 (mut i32) (i32.const 10))
+ (func "foo" (result i32)
+ (i32.load offset=4 align=1
+ (i32.and
+ (block $label$1 (result i32)
+ (global.set $global$0
+ (i32.const 0)
+ )
+ (i32.const -64)
+ )
+ (i32.const 15)
+ )
+ )
+ )
+)
+
+