Skip to content

Python: Test demonstrating the need for phi-read-nodes #14858

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

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

yoff
Copy link
Contributor

@yoff yoff commented Nov 21, 2023

Or for a data flow node filling that role, at least.

Or for a data flow node filling that role, at least.
@yoff yoff requested a review from a team as a code owner November 21, 2023 12:55
def scope():
x = 0

if(cond > 3):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also add a test for normal phi nodes, i.e. something like

    if(cond > 3):
      if(cond > 2):
        if(cond > 1):
           pass
        else:
          x = 1
      else:
        x = 2
    else:
      x = 3

    if(cond > 3):
      if(cond > 2):
        if(cond > 1):
           pass
        else:
          use(x)
      else:
        use(x)
    else:
      use(x)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put that in #14861. (Looks like I came to the exact same example :-))

@yoff yoff added the no-change-note-required This PR does not need a change note label Nov 21, 2023
@yoff yoff mentioned this pull request Nov 21, 2023
@yoff yoff merged commit 4f7fde7 into github:main Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants