public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/51729] New: dspr2-MULT.c and dspr2-MULTU.c fail for MIPS
@ 2012-01-02 11:26 rsandifo at gcc dot gnu.org
  2012-01-02 11:34 ` [Bug target/51729] " rsandifo at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2012-01-02 11:26 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51729
           Summary: dspr2-MULT.c and dspr2-MULTU.c fail for MIPS
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rsandifo@gcc.gnu.org


dspr2-MULT.c and dspr2-MULTU.c are supposed to test that we use the
DSP accumulator registers to parallelise multiplications.  They don't
work in 4.7, and I'm about to XFAIL them.  There seem to be two main
problems:

* The cost of moving between DSP accumulators is greater than the cost
  of moving a DSP register to or from memory.  When I last looked,
  this was enough to make the register allocator consider memory to
  be cheaper.

  This isn't a problem without -mdsp because there is then only one
  accumulator register, LO+HI.  (Note that we no longer allow HI and
  LO to store independent values.)  The cost of moving between accumulators
  is therefore ignored.

  On some (many?) targets, moving something out of an accumulator
  and back again _is_ more expensive than storing an accumulator
  to memory, so this isn't necessarily a bug in the backend.

* Even if we massage the costs to avoid that problem, each of the pseudos
  that we'd like to use accumulators has one "=ka" constraint and one
  "d" constraint.  At one point this meant that DSP_REGS and GENERAL_REGS
  had the same cost, and reg_alloc_order could be used to prefer accumulators:

    http://gcc.gnu.org/ml/gcc/2010-12/msg00471.html
    http://gcc.gnu.org/ml/gcc/2011-01/msg00093.html

  But GENERAL_REGS now seems to have a lower cost, and since GENERAL_REGS
  are much easier to spill than DSP_REGS, it's hard to argue with that.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/51729] dspr2-MULT.c and dspr2-MULTU.c fail for MIPS
  2012-01-02 11:26 [Bug target/51729] New: dspr2-MULT.c and dspr2-MULTU.c fail for MIPS rsandifo at gcc dot gnu.org
@ 2012-01-02 11:34 ` rsandifo at gcc dot gnu.org
  2012-01-04  1:20 ` pinskia at gcc dot gnu.org
  2014-07-31 15:19 ` matthew.fortune at imgtec dot com
  2 siblings, 0 replies; 4+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2012-01-02 11:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 2012-01-02 11:33:39 UTC ---
Author: rsandifo
Date: Mon Jan  2 11:33:35 2012
New Revision: 182793

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182793
Log:
gcc/testsuite/
    PR target/51729
    * gcc.target/mips/dspr2-MULT.c: Remove -ffixed-hi -ffixed-lo.
    XFAIL.
    * gcc.target/mips/dspr2-MULTU.c: Likewise.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/mips/dspr2-MULT.c
    trunk/gcc/testsuite/gcc.target/mips/dspr2-MULTU.c


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/51729] dspr2-MULT.c and dspr2-MULTU.c fail for MIPS
  2012-01-02 11:26 [Bug target/51729] New: dspr2-MULT.c and dspr2-MULTU.c fail for MIPS rsandifo at gcc dot gnu.org
  2012-01-02 11:34 ` [Bug target/51729] " rsandifo at gcc dot gnu.org
@ 2012-01-04  1:20 ` pinskia at gcc dot gnu.org
  2014-07-31 15:19 ` matthew.fortune at imgtec dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-04  1:20 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-04
     Ever Confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-04 01:19:39 UTC ---
Confirmed.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/51729] dspr2-MULT.c and dspr2-MULTU.c fail for MIPS
  2012-01-02 11:26 [Bug target/51729] New: dspr2-MULT.c and dspr2-MULTU.c fail for MIPS rsandifo at gcc dot gnu.org
  2012-01-02 11:34 ` [Bug target/51729] " rsandifo at gcc dot gnu.org
  2012-01-04  1:20 ` pinskia at gcc dot gnu.org
@ 2014-07-31 15:19 ` matthew.fortune at imgtec dot com
  2 siblings, 0 replies; 4+ messages in thread
From: matthew.fortune at imgtec dot com @ 2014-07-31 15:19 UTC (permalink / raw)
  To: gcc-bugs

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

Matthew Fortune <matthew.fortune at imgtec dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clm at codesourcery dot com,
                   |                            |matthew.fortune at imgtec dot com,
                   |                            |sandra at codesourcery dot com

--- Comment #3 from Matthew Fortune <matthew.fortune at imgtec dot com> ---
The affected tests appear to have started passing again since this commit:

svn: r211959

    2014-06-24  Catherine Moore  <clm@codesourcery.com>
            Sandra Loosemore  <sandra@codesourcery.com>

        gcc/
        * config/mips/mips.c (mips_order_regs_for_local_alloc): Delete.
        * config/mips/mips.h (ADJUST_REG_ALLOC_ORDER): Delete.
        * config/mips/mips-protos.h (mips_order_regs_for_local_alloc): Delete.

Irritatingly they now pass for -O2 and -O3 but still fail for -O1 and -Os. I
was half tempted to submit a patch to just be content that we get multiple
accumulators now used at -O2 and -O3 and leave it at that but I think that is
probably the wrong attitude.

Has anyone else noticed the change in state for these tests and looked into it,
planning to look into it or have any thoughts? I'll take a look when I get
chance.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-31 15:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-02 11:26 [Bug target/51729] New: dspr2-MULT.c and dspr2-MULTU.c fail for MIPS rsandifo at gcc dot gnu.org
2012-01-02 11:34 ` [Bug target/51729] " rsandifo at gcc dot gnu.org
2012-01-04  1:20 ` pinskia at gcc dot gnu.org
2014-07-31 15:19 ` matthew.fortune at imgtec dot com

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).