File: O2_precompute-propagate_print-stack-ir.wast

package info (click to toggle)
binaryen 120-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 41,284 kB
  • sloc: cpp: 189,449; javascript: 62,189; ansic: 14,087; python: 5,379; pascal: 441; sh: 77; makefile: 30; asm: 27
file content (17 lines) | stat: -rw-r--r-- 604 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(module
 (func $func (export "func") (param $var$0 i32) (param $var$1 i32) (param $var$2 i32) (param $var$3 i64) (result i64)
  (local $var$4 i32)
  (block $label$1
   (local.set $var$3
    (i64.const 2147483647)
   )
   (br_if $label$1
    (local.get $var$4) ;; precompute-propagate will optimize this into 0, then the br_if is nopped
                       ;; in place. if stack ir is not regenerated, that means we have the get
                       ;; on the stack from before, and the br_if is now a nop, which means no one
                       ;; pops the get
   )
  )
  (local.get $var$3)
 )
)