public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/50358] New: AVR: Implement [u]maddqihi4 [u]msubqihi4 patterns on the enhanced core
@ 2011-09-11 17:47 gjl at gcc dot gnu.org
  2011-09-11 17:47 ` [Bug target/50358] " gjl at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-09-11 17:47 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50358
           Summary: AVR: Implement [u]maddqihi4 [u]msubqihi4 patterns on
                    the enhanced core
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gjl@gcc.gnu.org
                CC: eric.weddington@atmel.com
            Target: avr


avr-gcc 4.6.1 -Os -mmcu=atmega8 translates the following test function

int madd_x (int i, char a, char b)
{
    return i + a*b;
}

to

    muls r22,r20     ;  10    mulqihi3
    movw r20,r0
    clr r1
    add r20,r24     ;  11    *addhi3/1
    adc r21,r25
    movw r24,r20     ;  31    *movhi/1

where it could be

    muls r22,r20     ;  *maddqihi4/1
    add r24,r0
    adc r25,r1
    clr r1

instead i.e. the addition can be done in place and the product need not to be
moved out of R0, reducing code size and register pressure and increasing speed.


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

end of thread, other threads:[~2011-09-16 18:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-11 17:47 [Bug target/50358] New: AVR: Implement [u]maddqihi4 [u]msubqihi4 patterns on the enhanced core gjl at gcc dot gnu.org
2011-09-11 17:47 ` [Bug target/50358] " gjl at gcc dot gnu.org
2011-09-11 17:55 ` gjl at gcc dot gnu.org
2011-09-11 18:29 ` gjl at gcc dot gnu.org
2011-09-12 19:18 ` gjl at gcc dot gnu.org
2011-09-13  9:28 ` gjl at gcc dot gnu.org
2011-09-16 19:06 ` gjl at gcc dot gnu.org
2011-09-16 19:13 ` gjl at gcc dot gnu.org

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