summaryrefslogtreecommitdiff
path: root/test/passes/simplify-locals.txt
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2019-03-07 17:13:02 -0800
committerGitHub <noreply@github.com>2019-03-07 17:13:02 -0800
commitd8bcf64e48f2c33dc785b16c8d3c0b8f5ccc63ef (patch)
treec005e77373453477401b35ef3631de59704a053d /test/passes/simplify-locals.txt
parent1a5b410701542413f497b3030c0b87f3600dc1bc (diff)
downloadbinaryen-d8bcf64e48f2c33dc785b16c8d3c0b8f5ccc63ef.tar.gz
binaryen-d8bcf64e48f2c33dc785b16c8d3c0b8f5ccc63ef.tar.bz2
binaryen-d8bcf64e48f2c33dc785b16c8d3c0b8f5ccc63ef.zip
Optimize away sets of the same local (#1940)
Diffstat (limited to 'test/passes/simplify-locals.txt')
-rw-r--r--test/passes/simplify-locals.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/passes/simplify-locals.txt b/test/passes/simplify-locals.txt
index 81eb0d522..cfb995910 100644
--- a/test/passes/simplify-locals.txt
+++ b/test/passes/simplify-locals.txt
@@ -1690,4 +1690,33 @@
(i32.const -5417091)
)
)
+ (func $tee-chain (; 28 ;) (type $FUNCSIG$iiiiii) (param $x i32) (param $z i32) (param $t1 i32) (param $t2 i32) (param $t3 i32) (result i32)
+ (nop)
+ (drop
+ (i32.const 10)
+ )
+ (nop)
+ (local.set $t2
+ (local.tee $t3
+ (local.tee $t1
+ (call $tee-chain
+ (local.get $x)
+ (local.tee $z
+ (i32.const 10)
+ )
+ (local.get $t1)
+ (local.get $t2)
+ (local.get $t3)
+ )
+ )
+ )
+ )
+ (call $tee-chain
+ (local.get $x)
+ (local.get $z)
+ (local.get $t1)
+ (local.get $t2)
+ (local.get $t3)
+ )
+ )
)