Skip to content

Bug: selection_merge ends block. #240

Open
@DoeringChristian

Description

@DoeringChristian

Hi,

I'm writing a SPIR-V Jit and I noticed the following problem.
The SPIR-V specification states for OpSelectionMerge:
"This instruction must immediately precede either an OpBranchConditional or OpSwitch instruction. That is, it must be the second-to-last instruction in its block." The builder however ends the block when calling "selection_merge". When recording a conditional inserting the next operation e.g. OpBranchConditional, the result in the error "Error::MismatchedTerminator" since there is no block selected for the branch operation.

Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    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