Skip to content

[guards] GVN/NewGVN should propagate guard conditions #30871

@preames

Description

@preames
Bugzilla Link 31523
Version trunk
OS Linux
Blocks #30343
CC @sanjoy

Extended Description

GVN currently does not have any handling for the llvm.experimental.guard intrinsics. It does support assumes. We should extend the handling to propagate equalities from guards as well.

As a trivial example:
guard (a != null);
...
guard (a != null); // can be removed

Note that we also need to add the same handling to the new memory SSA based NewGVN.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillallvm:GVNGVN and NewGVN stages (Global value numbering)obsoleteIssues with old (unsupported) versions of LLVM

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions