Skip to content

JIT optimizer: !sym_is_null(obj) is not same as sym_is_not_null(obj) #148078

@Fidget-Spinner

Description

@Fidget-Spinner

Bug report

Bug description:

The problem with the above pattern is that obj has three states in terms of nullness, NULL/not-NULL/UKNOWN, so !not-null = UKNOWN/NULL which is not what the optimization is usually expecting (the unknown part).

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)topic-JITtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions