public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/48092] associative property of builtins is not exploited on GIMPLE
Date: Thu, 08 Sep 2011 11:59:00 -0000 [thread overview]
Message-ID: <bug-48092-4-6mHjPP5B7k@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48092-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48092
--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> 2011-09-08 10:50:46 UTC ---
On Thu, 8 Sep 2011, vincenzo.innocente at cern dot ch wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48092
>
> --- Comment #3 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-09-08 10:01:48 UTC ---
> btw even in C with -Ofast
> a*exp(x)*exp(y) (same for sqrt) is NOT optimized. compare
>
> double exp0(double x, double y) {
> return exp(x)*exp(y);
> }
>
> double exp1(double a, double x, double y) {
> return a*exp(x)*exp(y);
> }
Yes, that's because those simplification all are implemented in
fold-const.c. Compare
double exp03(double a, double x, double y) {
double tmp1 = exp(x);
double tmp2 = exp(y);
return a*(tmp1*tmp2);
}
and in fold-const.c we don't associate FP math. tree-ssa-reassoc.c
re-associates exp1, but then the simplification is missing - see
my exp03 example.
next prev parent reply other threads:[~2011-09-08 10:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-12 14:57 [Bug tree-optimization/48092] New: associative property of sqrt vincenzo.innocente at cern dot ch
2011-08-05 8:17 ` [Bug rtl-optimization/48092] missing optimization (associative property of sqrt) vincenzo.innocente at cern dot ch
2011-08-05 8:35 ` [Bug tree-optimization/48092] associative property of builtins is not exploited on GIMPLE rguenth at gcc dot gnu.org
2011-09-08 10:14 ` vincenzo.innocente at cern dot ch
2011-09-08 11:59 ` rguenther at suse dot de [this message]
2021-07-21 2:46 ` pinskia at gcc dot gnu.org
2023-05-12 5:46 ` pinskia at gcc dot gnu.org
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-48092-4-6mHjPP5B7k@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).