Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: selection_merge ends block. #240

Open
DoeringChristian opened this issue Dec 31, 2022 · 0 comments
Open

Bug: selection_merge ends block. #240

DoeringChristian opened this issue Dec 31, 2022 · 0 comments

Comments

@DoeringChristian
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant