KhronosGroup / KhronosGroup/SPIRV-Tools
spirv-fuzz: Replace OpSwitch with blocks containing an OpBranchConditional instruction.
- 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
Assessment
This issue has not been assessed yet.