From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Richard Biener <richard.guenther@gmail.com>,
"giuliano.belinassi@usp.br" <giuliano.belinassi@usp.br>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, nd <nd@arm.com>
Subject: Re: [PATCH] Fix PR89437
Date: Mon, 04 Mar 2019 13:39:00 -0000 [thread overview]
Message-ID: <DB5PR08MB1030568DD0A1BBF8293C6A2883710@DB5PR08MB1030.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <CAFiYyc1skr7TWmqOmwtT0fOCZEpWXMpFDNo2KfEH22XX8A=wYg@mail.gmail.com>
Hi Richard,
>On Thu, Feb 21, 2019 at 6:09 PM Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:
>>
>> Hi Richard,
>>
>> >>Fix an issue with sinl (atanl (sqrtl (LDBL_MAX)) returning 0.0
>> >>instead of 1.0 by using x < sqrtl (LDBL_MAX) in match.pd.
>> >
>> > Wasn't that a intermediate problem with the mpfr exponent range limiting?
>> > Please check whether that's still needed.
>>
>> I tested it with trunk about an hour ago, and it included Jacub's patch.
>> Are there other fixes outstanding which haven't been committed yet?
>
> Not that I know of. Did we root-cause the bogus folding to 0.0? Because
> I don't really understand why using < can "fix" this...
Yes, the underlying issue is that build_sinatan_real returns the first value that does
overflow when squared. Maybe that wasn't intended, but using less-than on the first
value that does overflow works. With my patch (now committed) the test passes in
all rounding modes.
Like I mentioned, in the future this check could use a much smaller value based on
the size of the mantissa - that's safer since you're not close to infinity.
> Latest trunk also still gives an assertion failure in mpc with the gcc.dg/torture/builtin-math-5.c
> which started at the same time as the other mpc/mpfr releated issues:
>
> build/src/mpc/src/pow.c:631: MPC assertion failed: z_imag || mpfr_number_p (MPC_RE(u))
> build/src/gcc/gcc/testsuite/gcc.dg/torture/builtin-math-5.c:95:3: internal compiler error: Aborted
> 0x6725ab crash_signal
> build/src/gcc/gcc/toplev.c:326
>
> Ick. Is there a PR about this?
This happens when using an old mpc (0.8.2). It's valid according to the configure check,
however it works with the 1.0.3 version that download-prerequisites uses. Maybe we should
increase the minimum mpc version in configure?
Wilco
next prev parent reply other threads:[~2019-03-04 13:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 16:28 Wilco Dijkstra
2019-02-21 17:06 ` Richard Biener
2019-02-21 17:43 ` Wilco Dijkstra
2019-02-22 9:58 ` Richard Biener
2019-03-04 13:39 ` Wilco Dijkstra [this message]
2019-03-04 13:51 ` Richard Biener
2019-02-21 17:34 ` Giuliano Belinassi
2019-02-21 22:35 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DB5PR08MB1030568DD0A1BBF8293C6A2883710@DB5PR08MB1030.eurprd08.prod.outlook.com \
--to=wilco.dijkstra@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=giuliano.belinassi@usp.br \
--cc=nd@arm.com \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).