KhronosGroup / KhronosGroup/SPIRV-Tools

spirv-fuzz: Replace OpSwitch with blocks containing an OpBranchConditional instruction.

Open
#3,484 3 comments 0 reactions 1 assignee Claimed by @andreperezmaselco View on GitHub
component:fuzzer
Dominant language
C++
Stars
1.4k
Forks
709
Avg merge
1d 22h
Merged PRs (30d)
28

Description

The `OpSwitch` instruction can be replaced with blocks with an `OpBranchConditional`.
The following is an example:
```
OpSelectionMerge %merge_label None
OpSwitch %integer %default_label 0 %target_label_1 1 %target_label_2 2 %target_label_3
```
->
```
OpSelectionMerge %merge_label None
OpBranchConditional %integer_comparison_1 %target_label_1 %label_2
%target_label_1 = OpLabel ...
%label_2 = OpLabel
OpBranchConditional %integer_comparison_2 %target_label_2 %label_3
%target_label_2 = OpLabel ...
%label_3 = OpLabel
OpBranchConditional %integer_comparison_3 %target_label_3 %label_4
%target_label_3 = OpLabel ...
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.