summaryrefslogtreecommitdiff
path: root/test/passes/optimize-instructions.wast
blob: b579a2054ec8bb0a6a855cb75e81f02daff6aba4 (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
(module
  (memory 0)
  (func $f (param $i1 i32) (param $i2 i64)
    (if
      (i32.eqz
        (get_local $i1)
      )
      (i32.const 10)
    )
    (if
      (i32.eqz
        (get_local $i1)
      )
      (i32.const 11)
      (i32.const 12)
    )
    (if
      (i64.eqz
        (get_local $i2)
      )
      (i32.const 11)
      (i32.const 12)
    )
    (i32.eqz (i32.gt_s (i32.const 1) (i32.const 2)))
    (i32.eqz (i32.ge_s (i32.const 1) (i32.const 2)))
    (i32.eqz (i32.lt_s (i32.const 1) (i32.const 2)))
    (i32.eqz (i32.le_s (i32.const 1) (i32.const 2)))
    (i32.eqz (i32.gt_u (i32.const 1) (i32.const 2)))
    (i32.eqz (i32.ge_u (i32.const 1) (i32.const 2)))
    (i32.eqz (i32.lt_u (i32.const 1) (i32.const 2)))
    (i32.eqz (i32.le_u (i32.const 1) (i32.const 2)))
  )
)