public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jv244 at cam dot ac dot uk" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/40168] missing unrolling/scalarization/reassoc/free Date: Mon, 18 May 2009 12:20:00 -0000 [thread overview] Message-ID: <20090518121958.17879.qmail@sourceware.org> (raw) In-Reply-To: <bug-40168-6642@http.gcc.gnu.org/bugzilla/> ------- Comment #14 from jv244 at cam dot ac dot uk 2009-05-18 12:19 ------- Created an attachment (id=17886) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17886&action=view) simplified testcase for common subexpressions. Richard, thanks very much for the first patch. I tried to get a better testcase for the issue with the number of multiplies being too large (compile with gfortran -O3 -march=native -ffast-math -cpp test.f90). This is the newly attached test_reassoc.f90. The module contains two equivalent subroutines S1 and S2. In S1, gcc manages to reduce the multiplies nearly to the optimal one (I believe optimal is 81+81+9+9=180, gcc finds 198). In S2, which introduces a temporary array somewhat like in the original, this doesn't happen, and the number of multiplies is 324. Looks like the introduction of the temporary array blocks some optimisation. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40168
next prev parent reply other threads:[~2009-05-18 12:20 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-05-16 9:35 [Bug middle-end/40168] New: " jv244 at cam dot ac dot uk 2009-05-16 9:36 ` [Bug middle-end/40168] " jv244 at cam dot ac dot uk 2009-05-16 9:54 ` [Bug fortran/40168] " rguenth at gcc dot gnu dot org 2009-05-16 10:04 ` rguenth at gcc dot gnu dot org 2009-05-16 11:19 ` jv244 at cam dot ac dot uk 2009-05-16 11:20 ` rguenth at gcc dot gnu dot org 2009-05-16 11:31 ` jv244 at cam dot ac dot uk 2009-05-16 11:39 ` rguenther at suse dot de 2009-05-16 12:20 ` jv244 at cam dot ac dot uk 2009-05-16 12:39 ` jv244 at cam dot ac dot uk 2009-05-16 13:46 ` jvdelisle at gcc dot gnu dot org 2009-05-16 14:48 ` pinskia at gcc dot gnu dot org 2009-05-18 8:53 ` rguenth at gcc dot gnu dot org 2009-05-18 10:25 ` rguenth at gcc dot gnu dot org 2009-05-18 12:20 ` jv244 at cam dot ac dot uk [this message] 2009-05-27 11:01 ` rguenth at gcc dot gnu dot org 2009-06-06 7:08 ` jv244 at cam dot ac dot uk 2009-06-14 12:31 ` rguenther at suse dot de 2009-06-14 13:40 ` rguenth at gcc dot gnu dot org 2009-12-18 14:32 ` pault at gcc dot gnu dot org 2009-12-18 14:45 ` [Bug tree-optimization/40168] " rguenth at gcc dot gnu dot 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=20090518121958.17879.qmail@sourceware.org \ --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: linkBe 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).