File: simplify-locals-notee.wast

package info (click to toggle)
binaryen 108-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 35,424 kB
  • sloc: cpp: 151,487; javascript: 62,522; ansic: 13,124; python: 5,260; pascal: 441; sh: 75; asm: 27; makefile: 8
file content (32 lines) | stat: -rw-r--r-- 771 bytes parent folder | download | duplicates (6)
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
(module
  (func $contrast ;; check for tee and structure sinking
    (local $x i32)
    (local $y i32)
    (local $z i32)
    (local $a i32)
    (local $b i32)
    (local.set $x (i32.const 1))
    (if (local.get $x) (nop))
    (if (local.get $x) (nop))
    (local.set $y (if (result i32) (i32.const 2) (i32.const 3) (i32.const 4)))
    (drop (local.get $y))
    (local.set $z (block (result i32) (i32.const 5)))
    (drop (local.get $z))
    (if (i32.const 6)
      (local.set $a (i32.const 7))
      (local.set $a (i32.const 8))
    )
    (drop (local.get $a))
    (block $val
      (if (i32.const 10)
        (block
          (local.set $b (i32.const 11))
          (br $val)
        )
      )
      (local.set $b (i32.const 12))
    )
    (drop (local.get $b))
  )
)