public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "zsojka at seznam dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/105384] compilation never (?) finishes with __builtin_yn{,f,l} at -O and above
Date: Tue, 26 Apr 2022 07:37:17 +0000	[thread overview]
Message-ID: <bug-105384-4-FVkDSKC046@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105384-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105384

--- Comment #6 from Zdenek Sojka <zsojka at seznam dot cz> ---
(In reply to Richard Biener from comment #5)
> The bessel functions are known to take a lot of time, there are (fixed?)
> older bugreports about those and we do take some measures to speed up the
> computation.
> We might want to give up the idea on producing correctly rounded results and
> simply invoke the host library routines here ...

$ cat testcase.c 
double
foo(double a, double b)
{
  return __builtin_yn(a, b);
}
double
bar(double a, double b)
{
  return __builtin_jn(a, b);
}
int main()
{
  foo(0x220f0985, 0xbc7bc234);
  bar(4292622104, 0xff00ff00ff00ff00);
  return 0;
}
$ gcc testcase.c -lm -O1
$ time ./a.out 

real    0m2.825s
user    0m2.815s
sys     0m0.010s

It takes quite some time at runtime, but the compilation time evaluation takes
several magnitudes more time (PR105384) and/or memory (PR105385).

  parent reply	other threads:[~2022-04-26  7:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-25 19:42 [Bug tree-optimization/105384] New: " zsojka at seznam dot cz
2022-04-25 19:45 ` [Bug tree-optimization/105384] " pinskia at gcc dot gnu.org
2022-04-25 19:46 ` pinskia at gcc dot gnu.org
2022-04-25 19:52 ` zsojka at seznam dot cz
2022-04-25 20:44 ` marxin at gcc dot gnu.org
2022-04-26  6:52 ` rguenth at gcc dot gnu.org
2022-04-26  7:37 ` zsojka at seznam dot cz [this message]
2022-04-26 18:04 ` joseph at codesourcery dot com

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=bug-105384-4-FVkDSKC046@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).