summaryrefslogtreecommitdiff
path: root/test/passes/local-cse.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/passes/local-cse.txt')
-rw-r--r--test/passes/local-cse.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/passes/local-cse.txt b/test/passes/local-cse.txt
index 970a13dd8..62395f73f 100644
--- a/test/passes/local-cse.txt
+++ b/test/passes/local-cse.txt
@@ -1,5 +1,7 @@
(module
(type $0 (func (result i64)))
+ (type $1 (func))
+ (global $glob (mut i32) (i32.const 1))
(func $i64-shifts (; 0 ;) (type $0) (result i64)
(local $temp i64)
(set_local $temp
@@ -19,4 +21,17 @@
)
(get_local $temp)
)
+ (func $global (; 1 ;) (type $1)
+ (local $x i32)
+ (local $y i32)
+ (set_local $x
+ (get_global $glob)
+ )
+ (set_local $y
+ (get_local $x)
+ )
+ (set_local $y
+ (get_local $x)
+ )
+ )
)