[PATCH] 8217561 : X86: Add floating-point Math.min/max intrinsics

B. Blaser bsrbnd at gmail.com
Wed Feb 6 22:43:38 UTC 2019


Hi Jatin,

On Wed, 6 Feb 2019 at 15:04, Bhateja, Jatin <jatin.bhateja at intel.com> wrote:
>
> Hi Bernard,
>
> Thanks, let me if there are other comments / result of your test runs.
> Will then send the updated patch.
>
> Regards,
> Jatin

Tier1 is OK on x86_64 (xeon) and your patch seems good to me, but I
cannot verify the x86_32 part myself (and I'm not sure we really need
it?).

Andrew pushed the original test case, so you can re-base your fix on it.
I tried some additional combinations with +/-0.0 and fNaN/dNaN where
x86 min/max instructions differ from the Java doc and all seems right.

You may want to add them in 'f_cases':

        { fPosZero, fNegZero, fNegZero, fPosZero },
        { fNegZero, fPosZero, fNegZero, fPosZero },

        {     fPos,     fNaN,     fNaN,     fNaN },
        {     fNaN,     fPos,     fNaN,     fNaN },
        {     fNeg,     fNaN,     fNaN,     fNaN },
        {     fNaN,     fNeg,     fNaN,     fNaN },

        {  fPosInf,     fNaN,     fNaN,     fNaN },
        {     fNaN,  fPosInf,     fNaN,     fNaN },
        {  fNegInf,     fNaN,     fNaN,     fNaN },
        {     fNaN,  fNegInf,     fNaN,     fNaN },

        {   fPos,(float)dNaN,     fNaN,     fNaN },
        {(float)dNaN,   fPos,     fNaN,     fNaN },

and in 'd_cases':

        { dPosZero, dNegZero, dNegZero, dPosZero },
        { dNegZero, dPosZero, dNegZero, dPosZero },

        {     dPos,     dNaN,     dNaN,     dNaN },
        {     dNaN,     dPos,     dNaN,     dNaN },
        {     dNeg,     dNaN,     dNaN,     dNaN },
        {     dNaN,     dNeg,     dNaN,     dNaN },

        {  dPosInf,     dNaN,     dNaN,     dNaN },
        {     dNaN,  dPosInf,     dNaN,     dNaN },
        {  dNegInf,     dNaN,     dNaN,     dNaN },
        {     dNaN,  dNegInf,     dNaN,     dNaN },

        {     dPos,     fNaN,     dNaN,     dNaN },
        {     fNaN,     dPos,     dNaN,     dNaN },

Regards,
Bernard


More information about the hotspot-compiler-dev mailing list