This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCHv4][PING][PR 57371] Remove useless floating point casts in comparisons


Hi all,

This is an updated version of patch in
https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00409.html . It prevents
optimization in presense of sNaNs (and qNaNs when comparison operator
is > >= < <=) to preserve FP exceptions.

Note that I had to use -fsignaling-nans in pr57371-5.c test because by
default this option is off and some existing patterns in match.pd
happily optimize NaN comparisons, even with sNaNs (!).

Bootstrapped and regtested on x64. Ok for trunk?

-Y

Attachment: pr57371-4.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]