public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "wilson at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/43902] suboptimal MIPS widening multiply accumulate
Date: Wed, 16 Jun 2010 06:30:00 -0000	[thread overview]
Message-ID: <20100616063025.22467.qmail@sourceware.org> (raw)
In-Reply-To: <bug-43902-338@http.gcc.gnu.org/bugzilla/>



------- Comment #10 from wilson at codesourcery dot com  2010-06-16 06:30 -------
Subject: Re:  suboptimal MIPS widening multiply accumulate

On Wed, 2010-06-09 at 20:21 +0000, bernds at gcc dot gnu dot org wrote:
> What do you think?  Please let me know what your MIPS tests turned up.

I'm looking at this again.  My MIPS tests showed that my patch fixed 17
gcc.target/mips multiply-accumulate testcases that were accidentally
broken by the new tree level widening multiply optimization pass.  My
new testcase madd-9.c failed, but it turned out that I accidentally
double-patched the file.  Fixing the file, it now passes.  I forgot to
include this testcase in my second patch, though it was there in the
first one.  The bad news is that there are two new failures:
dpaq_sa_l_w.c and dpsq_sa_l_w.c.  These are MIPS DSP fixed-point
multiply-accumulate testcases, which is something I definitely didn't
bother to check earlier.  Overall I would say it is a win, since it
fixes many int/long/long long examples, and only breaks a few obscure
cases that should be fixable with a little more work.

I'm looking at your patch too.  There is a testcase that doesn't appear
to belong, gcc.target/arm/pr42172-1.c.  I'm not sure why
convert_plusminus_to_widen needs to check for MULT and call
convert_mult_to_widen.  If we are scanning basic blocks from top to
bottom, it seems that the multiplies would have already been checked.
But maybe this has something to do with looking at operands computed in
other basic blocks that haven't been scanned yet, in which case it would
make sense.  I'm not sure if that is possible.  Otherwise, it looks like
you have completed and cleanup up a bunch of stuff that I didn't get far
enough to notice.  It all looks good to me.  I can try rerunning MIPS
testcases to see how it works.

I see that the failure of the DSP fixed-point tests is because we have
checks for
+  if (TREE_CODE (type) != INTEGER_TYPE)
+    return false;
and the old code in expr.c that we are replacing does
-      if ((TREE_CODE (type) == INTEGER_TYPE
-          || TREE_CODE (type) == FIXED_POINT_TYPE)
So that looks like an easy fix (assuming no other complications), but
will require a rebuild and retest.

Jim


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43902


  parent reply	other threads:[~2010-06-16  6:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-26 20:08 [Bug target/43902] New: " wilson at gcc dot gnu dot org
2010-04-27  1:18 ` [Bug target/43902] " wilson at gcc dot gnu dot org
2010-04-27  9:33 ` rguenth at gcc dot gnu dot org
2010-05-03 22:29 ` wilson at codesourcery dot com
2010-05-03 22:36 ` wilson at gcc dot gnu dot org
2010-05-25  6:30 ` wilson at gcc dot gnu dot org
2010-05-25  6:35 ` wilson at gcc dot gnu dot org
2010-06-07 21:35 ` bernds at gcc dot gnu dot org
2010-06-07 22:18 ` wilson at codesourcery dot com
2010-06-09 20:21 ` bernds at gcc dot gnu dot org
2010-06-16  6:30 ` wilson at codesourcery dot com [this message]
2010-06-16 13:29 ` bernds at gcc dot gnu dot org
2010-06-17  4:29 ` wilson at codesourcery dot com
2010-06-25  8:56 ` bernds at gcc dot gnu dot org
2010-06-29 13:44 ` bernds at gcc dot gnu dot org
     [not found] <bug-43902-4@http.gcc.gnu.org/bugzilla/>
2012-07-27 21:33 ` 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=20100616063025.22467.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: 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).