Skip to content

JIT: Generate v{min/max}ss for a > b ? a : b pattern instead of cmp + jmp #116802

Description

@BoyBaykiller

https://godbolt.org/z/1W83cYox1

floatMax(floata,floatb){returna>b?a:b;}
Program:Max(float,float):float:this (FullOpts):
- vucomiss xmm1, xmm2- jbe SHORT G_M57467_IG05- vmovaps xmm0, xmm1- ret -G_M57467_IG05: ;; offset=0x000B- vmovaps xmm0, xmm2+ vmaxss xmm0, xmm1, xmm2
ret 

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions