Skip to content

[mlir] SCFIfConditionPropagationPass does nothing because visited set is never updated. #159165

@red1bluelost

Description

@red1bluelost

The change made in this PR #150278 does not work.

The underlying bug seems to be that the SCFIfConditionPropagationPass never inserts individual regions into the visited sets. Since the visited sets are empty, when it checks if a region is contained in them, it always comes up false.

The test file mlir/test/Dialect/SCF/if-cond-prop.mlir matches the then statement of the outer most if statement which is why the test passes. The test never verifies that other if statements do not exist or if an else branch exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions