Skip to content

Precompute bug #7765

@tlively

Description

@tlively
;; test.wast
(module
 (type $0 (sub (array nullexternref)))
 (rec
  (type $1 (sub (struct (field f32) (field (mut (ref null $2))) (field (mut i32)) (field exnref) (field i64) (field (mut i8)))))
  (type $2 (sub (func (result i32))))
  (type $3 (sub final $0 (array nullexternref)))
 )
 (type $4 (sub (struct (field i31ref) (field (ref null $3)))))
 (type $5 (sub $2 (func (result i32))))
 (type $13 (func (result (ref null $4))))
 (type $33 (func (param anyref) (result f32)))
 (type $6 (func))
 (elem declare func $0)
 (export "func_130_invoker" (func $124))
 (func $0 (type $5) (result i32)
  (unreachable)
 )
 (func $9 (type $13) (result (ref null $4))
  (unreachable)
 )
 (func $123 (type $33) (param $0 anyref) (result f32)
  (local $2 f32)
  (drop
   (array.new_default $3
    (select
     (i32.const 0)
     (i32.const 0)
     (struct.get_u $1 5
      (struct.new $1
       (f32.const 0)
       (ref.func $0)
       (ref.eq
        (struct.new_default $4)
        (call $9)
       )
       (ref.null noexn)
       (i64.const 0)
       (i32.const 0)
      )
     )
    )
   )
  )
  (local.get $2)
 )
 (func $124 (type $6)
  (drop
   (call $123
    (ref.null none)
   )
  )
 )
)

wasm-opt -all test.wast --fuzz-exec --optimize-level=3 --precompute-propagate

The fuzz-exec results are changed after optimization.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions