[PATCH 24/28] powerpc: hypot refactor and optimization
Adhemerval Zanella
adhemerval.zanella@linaro.org
Mon Jul 8 15:37:00 GMT 2019
On 26/06/2019 16:59, Gabriel F. T. Gomes wrote:
> On Fri, Mar 29 2019, Adhemerval Zanella wrote:
>>
>> - Two reduntant checks (for y == 0 and y > two60factor && (x / y) > two60)
> ~~~~~~
> I don't understand why y == 0 is redundant. It looks like an optimization
> as much as the check for x > y * 0x1p+60. Should we actually remove the
> check for y == 0?
Indeed redundant is not the correct word, it is an optimization. I have
reinstate it.
>
>> * sysdeps/powerpc/fpu/e_hypot.c (two60, two500, two600, two1022,
>> twoM500, twoM600, two60factor, pdnum): Remove.
>> (TEST_INFO_NAN): Remove macro.
>
> Missing mention to the removal of GET_TW0_HIGH_WORD?
Ack.
>
>> - if (y == 0.0)
>> - return x;
>
> As mentioned above, is it actually redundant?
>
>> + if (y <= 0x1.fffffffffffffp+963 && x > (y * 0x1p+60))
>> + return x + y;
>
> OK. Will not overflow.
>
> Other than that the patch looks good to me.
>
> Reviewed-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
>
More information about the Libc-alpha
mailing list