Skip to content
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

[IR] Require that ptrmask mask matches pointer index size #69343

Merged
merged 3 commits into from
Oct 24, 2023

Commits on Oct 18, 2023

  1. [IR] Require that ptrmask mask matches pointer index size

    Currently, the ptrmask intrinsic allows the mask to have any
    size and will zero-extend or truncate it to the pointer size.
    However, per the specified semantics, what we would actually
    need to do is to first zero-extend or truncate it to the pointer
    index size and then 1-extend it to the pointer size. This seems
    to leave a lot of room for error, so this patch proposes to
    make the intrinsic stricter:
    
    It now requires that the mask type matches the pointer index type
    -- a zext or trunc can be done explicitly in IR and should not
    be part of the intrinsic. Also spell out that the mask is 1-extended
    to the pointer size if we're talking about the integer representation
    (this is implied by the GEP expansion).
    nikic committed Oct 18, 2023
    Configuration menu
    Copy the full SHA
    cae33d1 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2023

  1. Configuration menu
    Copy the full SHA
    446be93 View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2023

  1. Configuration menu
    Copy the full SHA
    1a61193 View commit details
    Browse the repository at this point in the history