summaryrefslogtreecommitdiff
path: root/test/lit/memory64-ops.wast
blob: 8ba6ede02ba423896a5480ba940a3c79260e95d5 (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
;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.

;; RUN: foreach %s %t wasm-opt -all --roundtrip -S -o - | filecheck %s

(module
  ;; CHECK:      (memory $mem i64 1)
  (memory $mem i64 1)

  ;; CHECK:      (func $get_heap_size (type $0) (result i64)
  ;; CHECK-NEXT:  (i64.shl
  ;; CHECK-NEXT:   (memory.size)
  ;; CHECK-NEXT:   (i64.const 16)
  ;; CHECK-NEXT:  )
  ;; CHECK-NEXT: )
  (func $get_heap_size (result i64)
    (i64.shl
      (memory.size $mem)
      (i64.const 16)
    )
  )

  ;; CHECK:      (func $grow-heap (type $0) (result i64)
  ;; CHECK-NEXT:  (memory.grow
  ;; CHECK-NEXT:   (i64.const 32)
  ;; CHECK-NEXT:  )
  ;; CHECK-NEXT: )
  (func $grow-heap (result i64)
    (memory.grow $mem
      (i64.const 32)
    )
  )
)