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

spirv-fuzz: Bad interaction between FlattenConditionalBranch and synonym facts #4024

Closed
afd opened this issue Nov 13, 2020 · 1 comment · Fixed by #4030
Closed

spirv-fuzz: Bad interaction between FlattenConditionalBranch and synonym facts #4024

afd opened this issue Nov 13, 2020 · 1 comment · Fixed by #4030
Labels
component:fuzzer Relates to the spirv-fuzz tool

Comments

@afd
Copy link
Contributor

afd commented Nov 13, 2020

Suppose we have some code like this:

x = ...;
if (c) {
  y = x;
}
// (*)

We get a synonym fact between x and y meaning they are guaranteed to be equivalent whenever they are both available. Importantly they are not synonymous at (*) because y is not available there.

Currently if a conditional branch gets flattened we have the problem where the above turns into:

x = ...;
y = c ? x : arbitrary;
// (*)

We evidently cannot regard x and y as being synonymous now.

Perhaps FlattenConditionalBranch should be inapplicable if any instruction in the region being flattened generates an id that is involved in a synonym or equation.

@afd afd added the component:fuzzer Relates to the spirv-fuzz tool label Nov 13, 2020
@afd
Copy link
Contributor Author

afd commented Nov 13, 2020

I think this may only be a problem for loads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:fuzzer Relates to the spirv-fuzz tool
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant