summaryrefslogtreecommitdiff
path: root/test/lit/ctor-eval/memory64.wast
blob: b1e7b16138fc1e990448ffe9cb7bab1b89dd0f47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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: )