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

Optimise Away Constraints Which Always Pass #256

Closed
DavePearce opened this issue Jul 24, 2024 · 0 comments · Fixed by #322
Closed

Optimise Away Constraints Which Always Pass #256

DavePearce opened this issue Jul 24, 2024 · 0 comments · Fixed by #322

Comments

@DavePearce
Copy link
Collaborator

In mir/lower.go vanishing constraints are added after constant propagation is performed on their expressions. However, in some cases, these might evaluate to 0 and hence can be dropped altogether. For example:

(column X)
(vanish tmp (if 0 0 X))

Generates the following:

(column #0.X)
(vanish tmp 0)
(vanish tmp 0)

Clearly, we don't need to do anything here.

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

Successfully merging a pull request may close this issue.

1 participant