summaryrefslogtreecommitdiff
path: root/test/example/relooper-fuzz.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/example/relooper-fuzz.txt')
-rw-r--r--test/example/relooper-fuzz.txt255
1 files changed, 255 insertions, 0 deletions
diff --git a/test/example/relooper-fuzz.txt b/test/example/relooper-fuzz.txt
new file mode 100644
index 000000000..7dab4c5be
--- /dev/null
+++ b/test/example/relooper-fuzz.txt
@@ -0,0 +1,255 @@
+(module
+ (memory 1 1)
+ (export "mem" memory)
+ (start $main)
+ (type $i (func (result i32)))
+ (type $v (func))
+ (type $vi (func (param i32)))
+ (import $print "spectest" "print" (param i32))
+ (func $check (type $i) (result i32)
+ (if
+ (i32.eq
+ (i32.load
+ (i32.const 4)
+ )
+ (i32.const 108)
+ )
+ (unreachable)
+ )
+ (i32.store
+ (i32.const 4)
+ (i32.add
+ (i32.load
+ (i32.const 4)
+ )
+ (i32.const 4)
+ )
+ )
+ (call_import $print
+ (i32.sub
+ (i32.const 0)
+ (i32.load offset=4
+ (i32.load
+ (i32.const 4)
+ )
+ )
+ )
+ )
+ (i32.load offset=4
+ (i32.load
+ (i32.const 4)
+ )
+ )
+ )
+ (func $main (type $v)
+ (local $0 i32)
+ (local $1 i32)
+ (i32.store
+ (i32.const 8)
+ (i32.const 89)
+ )
+ (i32.store
+ (i32.const 12)
+ (i32.const 12)
+ )
+ (i32.store
+ (i32.const 16)
+ (i32.const 78)
+ )
+ (i32.store
+ (i32.const 20)
+ (i32.const 149)
+ )
+ (i32.store
+ (i32.const 24)
+ (i32.const 118)
+ )
+ (i32.store
+ (i32.const 28)
+ (i32.const 179)
+ )
+ (i32.store
+ (i32.const 32)
+ (i32.const 127)
+ )
+ (i32.store
+ (i32.const 36)
+ (i32.const 80)
+ )
+ (i32.store
+ (i32.const 40)
+ (i32.const 21)
+ )
+ (i32.store
+ (i32.const 44)
+ (i32.const 34)
+ )
+ (i32.store
+ (i32.const 48)
+ (i32.const 119)
+ )
+ (i32.store
+ (i32.const 52)
+ (i32.const 98)
+ )
+ (i32.store
+ (i32.const 56)
+ (i32.const 38)
+ )
+ (i32.store
+ (i32.const 60)
+ (i32.const 29)
+ )
+ (i32.store
+ (i32.const 64)
+ (i32.const 36)
+ )
+ (i32.store
+ (i32.const 68)
+ (i32.const 147)
+ )
+ (i32.store
+ (i32.const 72)
+ (i32.const 13)
+ )
+ (i32.store
+ (i32.const 76)
+ (i32.const 55)
+ )
+ (i32.store
+ (i32.const 80)
+ (i32.const 166)
+ )
+ (i32.store
+ (i32.const 84)
+ (i32.const 16)
+ )
+ (i32.store
+ (i32.const 88)
+ (i32.const 143)
+ )
+ (i32.store
+ (i32.const 92)
+ (i32.const 52)
+ )
+ (i32.store
+ (i32.const 96)
+ (i32.const 130)
+ )
+ (i32.store
+ (i32.const 100)
+ (i32.const 150)
+ )
+ (i32.store
+ (i32.const 104)
+ (i32.const 176)
+ )
+ (i32.store
+ (i32.const 108)
+ (i32.const 91)
+ )
+ (i32.store
+ (i32.const 112)
+ (i32.const 34)
+ )
+ (call_import $print
+ (i32.const 0)
+ )
+ (if
+ (i32.eq
+ (i32.rem_u
+ (set_local $0
+ (call $check)
+ )
+ (i32.const 2)
+ )
+ (i32.const 0)
+ )
+ (set_local $1
+ (i32.const 6)
+ )
+ (block
+ (call_import $print
+ (i32.const 8)
+ )
+ (set_local $0
+ (call $check)
+ )
+ )
+ )
+ (loop $shape$3$break $shape$3$continue
+ (if
+ (i32.eq
+ (get_local $1)
+ (i32.const 6)
+ )
+ (block
+ (set_local $1
+ (i32.const 0)
+ )
+ (call_import $print
+ (i32.const 5)
+ )
+ (if
+ (i32.eq
+ (i32.rem_u
+ (set_local $0
+ (call $check)
+ )
+ (i32.const 2)
+ )
+ (i32.const 0)
+ )
+ (br $shape$3$continue)
+ (block
+ (set_local $1
+ (i32.const 6)
+ )
+ (br $shape$3$continue)
+ )
+ )
+ )
+ )
+ (call_import $print
+ (i32.const 4)
+ )
+ (if
+ (i32.eq
+ (i32.rem_u
+ (set_local $0
+ (call $check)
+ )
+ (i32.const 3)
+ )
+ (i32.const 0)
+ )
+ (br $shape$3$continue)
+ (if
+ (i32.eq
+ (i32.rem_u
+ (get_local $0)
+ (i32.const 3)
+ )
+ (i32.const 1)
+ )
+ (block
+ (set_local $1
+ (i32.const 6)
+ )
+ (br $shape$3$continue)
+ )
+ )
+ )
+ (call_import $print
+ (i32.const 2)
+ )
+ (set_local $0
+ (call $check)
+ )
+ (set_local $1
+ (i32.const 6)
+ )
+ (br $shape$3$continue)
+ )
+ )
+)