Merged
Conversation
Contributor
Author
|
I create a draft for now because I want to investigate if block can be further 'short-circuit' during merge block |
delete short-circuit instructions in case they are used after Fix the find_join that worked only for trees
Contributor
|
For future tasks, as noted in your description, please create issues when this gets merged |
kevaundray
reviewed
Nov 10, 2022
jfecher
reviewed
Nov 10, 2022
Closed
jfecher
approved these changes
Nov 15, 2022
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary of changes
This PR fixes an issue related to IF statements where instructions under conditional statement would fail if the condition were true. With the example from the added test case, you can see it can happen that array expressions are out-of-bound in a condition that is not met. In that case, when we know that the expression is failing (at compile time), which can be because of:
We short circuit the block by replacing it with a constraint failing if the block assumption is true.
The PR is now finalised:
Note that divide-by-0 is not triggering a short circuit because it is handled by the constant folding. We should allow it when it is under an assumption and it will be handled as a short-circuit, but this can be done in another PR.
Test additions / changes
Regression test case is added to 9_conditional