Skip to content

makepad-stitch should preserve live registers upon entering control flow #4

@Robbepop

Description

@Robbepop
(module
  (func (export "test") (param i32) (result f32)
    (` (local.get 0))
    (if
        (i32.eqz (local.get 0))
        (then
            (local.get 0)
            (f32.convert_i32_u)
            (drop)
        )
    )
  )
)

Stitch returns 0 for test(0) and test(1) while it should return 0 and 1 respectively. The reason likely is that the register on the stack from f32.convert_i32_s is not preserved prior to entering if.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions