summaryrefslogtreecommitdiff
path: root/test/lit/ctor-eval
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/ctor-eval')
-rw-r--r--test/lit/ctor-eval/memory64.wast42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/lit/ctor-eval/memory64.wast b/test/lit/ctor-eval/memory64.wast
new file mode 100644
index 000000000..b1e7b1613
--- /dev/null
+++ b/test/lit/ctor-eval/memory64.wast
@@ -0,0 +1,42 @@
+;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
+;; RUN: wasm-ctor-eval %s --ctors=mem,tab --kept-exports=mem,tab --quiet -all -S -o - | filecheck %s
+
+(module
+ (memory $0 i64 16 17 shared)
+ (data $0 (i64.const 0) "abcd")
+
+ (table i64 1 funcref)
+ (elem $foo)
+
+ (func $mem (export "mem") (result i32)
+ (i32.load
+ (i64.const 0)
+ )
+ )
+
+ ;; CHECK: (type $0 (func (result funcref)))
+
+ ;; CHECK: (type $1 (func (result i32)))
+
+ ;; CHECK: (table $0 i64 1 funcref)
+
+ ;; CHECK: (export "mem" (func $mem_2))
+
+ ;; CHECK: (export "tab" (func $tab))
+
+ ;; CHECK: (func $tab (type $0) (result funcref)
+ ;; CHECK-NEXT: (table.get $0
+ ;; CHECK-NEXT: (i64.const 0)
+ ;; CHECK-NEXT: )
+ ;; CHECK-NEXT: )
+ (func $tab (export "tab") (result funcref)
+ ;; Not optimized yet, but we should not error either.
+ (table.get
+ (i64.const 0)
+ )
+ )
+)
+
+;; CHECK: (func $mem_2 (type $1) (result i32)
+;; CHECK-NEXT: (i32.const 1684234849)
+;; CHECK-NEXT: )