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

riscv64: Implement SIMD icmp #6609

Merged
merged 1 commit into from
Jun 21, 2023

Commits on Jun 20, 2023

  1. riscv64: Implement SIMD icmp

    These are implemented as a combination of two steps, mask generation and
    mask expansion. Our comparision rules only return their results as a mask
    register, so we need to expand the mask into lane sized elements.
    
    We have 20 (!) comparision instructions, nearly the full table of all IntCC codes
    in VV, VX and VI formats. However there are some holes in this table.
    
    They are:
    * `vmsltu.vi`
    * `vmslt.vi`
    * `vmsgtu.vv`
    * `vmsgt.vv`
    * `vmsgeu.*`
    * `vmsge.*`
    
    Most of these can be replaces with the inverted IntCC instruction, however
    this commit only implements the existing instructions without any inversion
    and the inverted VV versions of `sgtu`/`sgt`/`sgeu`/`sge` since we need them
    to get the full icmp functionality.
    
    I've split the actual mask expansion into it's own separate rule since we are
    going to need it for the `fcmp` rules as well.
    
    The instruction selection for `icmp` is on a separate rule simply because the
    rulse end up less verbose than if they were inlined directly into the `icmp` rule.
    afonso360 committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    9b69bf8 View commit details
    Browse the repository at this point in the history