Skip to content

SSA-CFG: Fix detection of equivalent instructions in Outliner#16768

Open
blishko wants to merge 1 commit into
developfrom
ssa-cfg-fix-outliner
Open

SSA-CFG: Fix detection of equivalent instructions in Outliner#16768
blishko wants to merge 1 commit into
developfrom
ssa-cfg-fix-outliner

Conversation

@blishko
Copy link
Copy Markdown
Contributor

@blishko blishko commented May 22, 2026

In the helper we use to check if arguments of two instructions are equivalent, we would say that two instructions are equivalent if they have the same index.
This is, however, not correct, as the two instructions can come from two different CFGs. Thus, same indices does not mean they refer to the same instruction.

We fixed the check instead to

  • Check if we have proven equivalence before; or
  • The two instructions refer to the same literal

In the helper we use to check if arguments of two instructions are
equivalent, we would say that two instructions are equivalent if they
have the same index.
This is, however, not correct, as the two instructions can come from two
different CFGs. Thus, same indices does not mean they refer to the same
instruction.

We fixed the check instead to
- Check if we have proven equivalence before; or
- The two instructions refer to the same literal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant