Skip to content

make sure that int.clamp and double.clamp are optimised in AOT #46879

@mraleph

Description

@mraleph

These operations are quite common when dealing with UI / graphics and right now we don't provide good lowering for them.

I have even noticed that we don't always properly propagate return type even when inputs are known to be integers.

On ARM for example we could use saturating instructions when clamping to ranges with power-of-2 based bounaries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.type-performanceIssue relates to performance or code size

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions