Skip to content

Consider using new LLVM intrinsic for i32::saturating_add etc. #55286

Description

@hanna-kruppe

As featured in LLVM Weekly, https://reviews.llvm.org/rL344629 introduces @llvm.sadd.sat for saturating signed integer addition. Not sure whether it's as transparent to the optimizer yet as open-coding it based on checked_add (as we currently do), but we might want to try it when we update to an LLVM version that has that intrinsic available.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions