;;; TOOL: run-roundtrip
;;; ARGS: --stdout --fold-exprs
(module
  (func $fold-get-local (result f32)
    (local f32 f32 f64 f64)
    get_local 0
    get_local 1
    f32.add
    get_local 2
    get_local 3
    f64.add
    f32.demote/f64
    f32.add)

  (func $fold-set-local
    (local i64 i32)
    i64.const 1
    i64.const 2
    i64.const 3
    i64.xor
    i64.xor
    set_local 0
    i32.const 4
    set_local 1)

  (func $fold-tee-local (result i32)
    (local i32 i32)
    i32.const 1
    tee_local 0
    i32.const 2
    tee_local 1
    i32.add)
  )
(;; STDOUT ;;;
(module
  (type (;0;) (func (result f32)))
  (type (;1;) (func))
  (type (;2;) (func (result i32)))
  (func (;0;) (type 0) (result f32)
    (local f32 f32 f64 f64)
    (f32.add
      (f32.add
        (local.get 0)
        (local.get 1))
      (f32.demote_f64
        (f64.add
          (local.get 2)
          (local.get 3)))))
  (func (;1;) (type 1)
    (local i64 i32)
    (local.set 0
      (i64.xor
        (i64.const 1)
        (i64.xor
          (i64.const 2)
          (i64.const 3))))
    (local.set 1
      (i32.const 4)))
  (func (;2;) (type 2) (result i32)
    (local i32 i32)
    (i32.add
      (local.tee 0
        (i32.const 1))
      (local.tee 1
        (i32.const 2)))))
;;; STDOUT ;;)
