summaryrefslogtreecommitdiff
path: root/test/unit.fromasm
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-09-10 10:47:37 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-09-10 10:49:12 -0700
commit3158ada0ee9f5e3d2daf019cfda545498b55285b (patch)
tree3dca71c6f810fc809f541188a66fceb9ecd43d98 /test/unit.fromasm
parent2427725215ad4a9a52c89c7d791a9277cc23db14 (diff)
downloadbinaryen-3158ada0ee9f5e3d2daf019cfda545498b55285b.tar.gz
binaryen-3158ada0ee9f5e3d2daf019cfda545498b55285b.tar.bz2
binaryen-3158ada0ee9f5e3d2daf019cfda545498b55285b.zip
sort locals by number of total copies
Diffstat (limited to 'test/unit.fromasm')
-rw-r--r--test/unit.fromasm36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/unit.fromasm b/test/unit.fromasm
index df86cfd34..dd47ae812 100644
--- a/test/unit.fromasm
+++ b/test/unit.fromasm
@@ -750,4 +750,40 @@
)
)
)
+ (func $loophi2 (result i32)
+ (local $0 i32)
+ (local $1 i32)
+ (local $2 i32)
+ (set_local $1
+ (i32.const 0)
+ )
+ (loop $label$continue$L7
+ (block $label$break$L7
+ (set_local $0
+ (i32.const 0)
+ )
+ (loop $while-in$1
+ (set_local $2
+ (get_local $0)
+ )
+ (if
+ (i32.const 1)
+ (br_if $label$break$L7
+ (get_local $2)
+ )
+ )
+ (br_if $while-in$1
+ (tee_local $0
+ (i32.add
+ (get_local $0)
+ (i32.const 1)
+ )
+ )
+ )
+ )
+ (br $label$continue$L7)
+ )
+ )
+ (get_local $1)
+ )
)