Skip to content

spirv-fuzz: Duplicate region using selection construct #3614

@afd

Description

@afd

Given a region R, this transformation will essentially turn R into:

if (...) {
  R;
} else {
  duplicate_of_R;
}

or alternatively to:

switch(...) {
case ...:
   R;
   break;
default:
   duplicate_of_R;
   break;

In both cases the value of the boolean guard or integer switch selector does not matter given that the branches are semantically equivalent.

The code after the duplicated region will need to use an OpPhi to capture ids generated by R and used after R.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions