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]

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


> Am 20.08.2019 um 17:32 schrieb Segher Boessenkool <segher@kernel.crashing.org>:
> 
> On Tue, Aug 20, 2019 at 05:19:46PM +0200, Ilya Leoshkevich wrote:
>>> Am 20.08.2019 um 17:04 schrieb Segher Boessenkool <segher@kernel.crashing.org>:
>>> 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 tried compiling:
>> 
>>    int foo(float a, float b) { return ((a < b) || (a > b)); }
>> 
>> with -ftrapping-math and -fno-trapping-math with gcc 8.0.1, and got LTGT
>> on tree and rtl levels in both cases:
>> 
>>    232t.optimized: _1 = a_2(D) <> b_3(D);
>>    312r.final:        (if_then_else:SI (ltgt (reg:CCS 33 %cc)
> 
> Hrm, it seems to need -ffinite-math-only, even?  Or just -ffast-math
> of course.  (That'll teach me to post without testing for another year
> or two, sorry!)

Ah, that's correct, and I have even added s390 tests for this: with
-ffinite-math-only the generated code is more "straightforward".  I
should update the commit message, but this isn't affecting the manual
update itself, right?


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