On Thu, Apr 23, 2020 at 10:42 AM Zhanghaijian (A)
<z.zhanghaij...@huawei.com> wrote:
>
> Hi
>
> This is a simple fix for pr94708.
> It's unsafe for rtl combine to generate fp min/max under 
> -funsafe-math-optimizations, considering NaNs.
> We can only do this kind of transformation under -funsafe-math-optimizations 
> and -ffinite-math-only.
> Bootstrap and tested on aarch64 Linux platform. No new regression witnessed.
>
> Any suggestion?

Please do not check flags, instead use && !HONOR_NANS (mode)
What about signed zeros?  The GENERIC folding routine producing
min/max is avoiding it when those are honored (and it doesn't
check flag_unsafe_math_optmizations at all).

Certainly the patch is an incremental correct fix, with the
flag testing replaced by the mode feature testing.

Richard.

> Thanks,
> Haijian Zhang

Reply via email to