Re: [PATCH 1/8] Document signaling for min, max and ltgt operations

2019-08-21 Thread Segher Boessenkool
On Wed, Aug 21, 2019 at 02:00:10PM +0200, Ilya Leoshkevich wrote: > > Am 20.08.2019 um 19:13 schrieb Segher Boessenkool > > : > > On Tue, Aug 20, 2019 at 06:13:00PM +0200, Ilya Leoshkevich wrote: > >>> Am 20.08.2019 um 17:50 schrieb Segher Boessenkool > >>> : > >>> There is currently no way to sa

Re: [PATCH 1/8] Document signaling for min, max and ltgt operations

2019-08-21 Thread Ilya Leoshkevich
> Am 20.08.2019 um 19:13 schrieb Segher Boessenkool > : > > On Tue, Aug 20, 2019 at 06:13:00PM +0200, Ilya Leoshkevich wrote: >>> Am 20.08.2019 um 17:50 schrieb Segher Boessenkool >>> : >>> There is currently no way to say (in trees or gimple or rtl) whether >>> comparisons are signaling ("or

Re: [PATCH 1/8] Document signaling for min, max and ltgt operations

2019-08-20 Thread Segher Boessenkool
On Tue, Aug 20, 2019 at 06:13:00PM +0200, Ilya Leoshkevich wrote: > > Am 20.08.2019 um 17:50 schrieb Segher Boessenkool > > : > > There is currently no way to say (in trees or gimple or rtl) whether > > comparisons are signaling ("ordered", generate a trap on an unordered > > result). I am workin

Re: [PATCH 1/8] Document signaling for min, max and ltgt operations

2019-08-20 Thread Ilya Leoshkevich
> Am 20.08.2019 um 17:50 schrieb Segher Boessenkool > : > > On Tue, Aug 20, 2019 at 11:18:38AM +0200, Ilya Leoshkevich wrote: >> Currently it's not clear whether or not min, max and ltgt should raise >> floating point exceptions when dealing with qNaNs. >> >> Right now a lot of code assumes that

Re: [PATCH 1/8] Document signaling for min, max and ltgt operations

2019-08-20 Thread Ilya Leoshkevich
> Am 20.08.2019 um 17:32 schrieb Segher Boessenkool > : > > On Tue, Aug 20, 2019 at 05:19:46PM +0200, Ilya Leoshkevich wrote: >>> Am 20.08.2019 um 17:04 schrieb Segher Boessenkool >>> : >>> The < and > operators separately already can cause exceptions, unless >>> you use -fno-trapping-math, in w

Re: [PATCH 1/8] Document signaling for min, max and ltgt operations

2019-08-20 Thread Segher Boessenkool
On Tue, Aug 20, 2019 at 11:18:38AM +0200, Ilya Leoshkevich wrote: > Currently it's not clear whether or not min, max and ltgt should raise > floating point exceptions when dealing with qNaNs. > > Right now a lot of code assumes that LTGT is signaling: in particular, > it's generated for ((x < y) |

Re: [PATCH 1/8] Document signaling for min, max and ltgt operations

2019-08-20 Thread Segher Boessenkool
On Tue, Aug 20, 2019 at 05:19:46PM +0200, Ilya Leoshkevich wrote: > > Am 20.08.2019 um 17:04 schrieb Segher Boessenkool > > : > > The < and > operators separately already can cause exceptions, unless > > you use -fno-trapping-math, in which case you cannot have LTGT at all. > > Hmm, I've just tri

Re: [PATCH 1/8] Document signaling for min, max and ltgt operations

2019-08-20 Thread Ilya Leoshkevich
> Am 20.08.2019 um 17:04 schrieb Segher Boessenkool > : > > On Tue, Aug 20, 2019 at 11:18:38AM +0200, Ilya Leoshkevich wrote: >> Currently it's not clear whether or not min, max and ltgt should raise >> floating point exceptions when dealing with qNaNs. >> >> Right now a lot of code assumes that

Re: [PATCH 1/8] Document signaling for min, max and ltgt operations

2019-08-20 Thread Segher Boessenkool
On Tue, Aug 20, 2019 at 11:18:38AM +0200, Ilya Leoshkevich wrote: > Currently it's not clear whether or not min, max and ltgt should raise > floating point exceptions when dealing with qNaNs. > > Right now a lot of code assumes that LTGT is signaling: in particular, > it's generated for ((x < y) |

[PATCH 1/8] Document signaling for min, max and ltgt operations

2019-08-20 Thread Ilya Leoshkevich
Currently it's not clear whether or not min, max and ltgt should raise floating point exceptions when dealing with qNaNs. Right now a lot of code assumes that LTGT is signaling: in particular, it's generated for ((x < y) || (x > y)), which is signaling. The behavior of MIN/MAX is (intentionally?)