Skip to content

Emit LLVM range metadata for call instructions #50157

Closed

Description

@hanna-kruppe

Adding !range to a call instruction to communicate the possible range of the return value (analogous to !range on loads) already works in LLVM today, we just need to use it. Fixes the test case in #49572 and we already have the information anyway, so it's a cheap and easy win. cc @eddyb

Activity

  1. nox commented on Apr 22, 2018

    @nox
    Contributor

    I'll try to implement that.

  2. self-assigned this
    on Apr 22, 2018
  3. hanna-kruppe commented on Apr 22, 2018

    @hanna-kruppe
    ContributorAuthor

    @nox noticed that this can't actually help with NonZeroU32::get (#49572) because the return type there is plain old u32 🤦‍♂️ But it still helps functions that return fieldless enums, or more generally enums that get packed into a single scalar (but not scalar pairs).

  4. added a commit that references this issue on Apr 24, 2018
    c4ba253
  5. added a commit that references this issue on Apr 28, 2018
    68a09fc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions