;;; TOOL: run-roundtrip
;;; ARGS: --stdout --fold-exprs --enable-memory64
(module
  (memory i64 1)
  (func $fold-load
    i64.const 1
    i32.load
    drop
    i64.const 2
    i32.load
    drop)

  (func $fold-store
    i64.const 1
    i64.load
    f32.const 2
    f32.store)

  (func $fold-memory-size (result i32)
    memory.size
    i64.const 1
    i64.add
    drop
    i32.const 2)

  (func $fold-memory-grow (result i32)
    i64.const 1
    i64.const 2
    memory.grow
    i64.lt_s))
(;; STDOUT ;;;
(module
  (type (;0;) (func))
  (type (;1;) (func (result i32)))
  (func (;0;) (type 0)
    (drop
      (i32.load
        (i64.const 1)))
    (drop
      (i32.load
        (i64.const 2))))
  (func (;1;) (type 0)
    (f32.store
      (i64.load
        (i64.const 1))
      (f32.const 0x1p+1 (;=2;))))
  (func (;2;) (type 1) (result i32)
    (drop
      (i64.add
        (memory.size)
        (i64.const 1)))
    (i32.const 2))
  (func (;3;) (type 1) (result i32)
    (i64.lt_s
      (i64.const 1)
      (memory.grow
        (i64.const 2))))
  (memory (;0;) i64 1))
;;; STDOUT ;;)
