On(c)e more: optimizer failure

Gabriel Ravier gabravier@gmail.com
Sun Aug 22 05:37:01 GMT 2021


On 8/21/21 10:19 PM, Stefan Kanthak wrote:
> Jakub Jelinek <jakub@redhat.com> wrote:
>
>> On Sat, Aug 21, 2021 at 09:40:16PM +0200, Stefan Kanthak wrote:
>>>> I believe your example doesn't take into account that the values can be NaN
>>>> which compares false in all situations.
>>> That's a misbelief!
>>> Please notice the first if-clause, which rules out NaNs for both arguments.
>>> Also notice that GCC did NOT generate JP after the 4 COMISD instructions
>>> in question, i.e. it knew that NaNs had been ruled out.
>> GCC doesn't do value range propagation of floating point values, not even
>> the special ones like NaNs, infinities, +/- zeros etc., and without that the
>> earlier ifs aren't taken into account for the earlier code.
> Ouch, to bad! That was but the very least expectation I had.
> And indeed, removing the 3 other if-clauses doesn't change how the
> final if-clause gets translated.
>
> Sorry Matt, we were both wrong with our assumptions.
>
>> Also, as you have been told already, sending these mails to gcc mailing list
>> is a very bad idea, unless somebody jumps on it immediately and implements
>> it, they will be effectively forgotten.  You should file missed
>> optimizations into gcc bugzilla where they can be seen any time.
> I don't have a bugzilla account, and I don't use GCC for anything serious.
>
> Stefan

It's *that* demanding for you to create a Bugzilla account ? From my 
experience, creating a Bugzilla account takes around 30 seconds (though 
I suppose you'd have to wait for a bit if automatic account creation is 
temporarily disabled), it quite honestly feels as though you've spent 
far more time writing out these e-mails and talking here on the mailing 
list than that.

On Bugzilla I've had some optimization bug reports of mine take months 
to get a response and more to get fixed, but at least something happened 
after a while: if I just went on the mailing list it's incredibly likely 
they'd have been completely and utterly lost to time (it's not that GCC 
devs don't like the mailing list, but there's a reason a *bug tracking 
system* is used...)



More information about the Gcc mailing list