public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/39819] [avr] Missed optimisation when setting 4-byte values
       [not found] <bug-39819-4@http.gcc.gnu.org/bugzilla/>
@ 2011-07-02 21:25 ` gjl at gcc dot gnu.org
  0 siblings, 0 replies; 3+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-07-02 21:25 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |gjl at gcc dot gnu.org
      Known to work|                            |4.6.1
         Resolution|                            |WONTFIX

--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-07-02 21:23:59 UTC ---
Closed as WONTFIX.

Compiled the following code in 4.6.1, -std=c99 -mmcu=atmega88 -Os

typedef unsigned char uint8_t;
typedef unsigned long int uint32_t;

uint8_t as[4];
uint8_t bs[4];
static const uint8_t sz = 4;

void foo1(void) {
    for (uint8_t i = 0; i < sz; i++) {
        bs[i] = as[1];
    }
}

void foo2(void) {
    for (uint8_t i = 0; i < sz; i++) {
        *(bs + i) = *(as + 1);
    }
}

The result is:

foo1:
    lds r24,as+1
    sts bs,r24
    sts bs+1,r24
    sts bs+2,r24
    sts bs+3,r24
    ret

foo2:
    lds r24,as+1
    sts bs,r24
    sts bs+1,r24
    sts bs+2,r24
    sts bs+3,r24
    ret

So the difference has gone.


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

* [Bug target/39819] [avr] Missed optimisation when setting 4-byte values
  2009-04-19 21:09 [Bug c/39819] New: " david dot brown at hesbynett dot no
  2009-04-19 22:26 ` [Bug target/39819] [avr] " eric dot weddington at atmel dot com
@ 2009-08-21 19:28 ` eric dot weddington at atmel dot com
  1 sibling, 0 replies; 3+ messages in thread
From: eric dot weddington at atmel dot com @ 2009-08-21 19:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from eric dot weddington at atmel dot com  2009-08-21 19:28 -------
Confirmed on 4.3.2.


-- 

eric dot weddington at atmel dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |4.3.2
   Last reconfirmed|0000-00-00 00:00:00         |2009-08-21 19:28:03
               date|                            |


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


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

* [Bug target/39819] [avr] Missed optimisation when setting 4-byte values
  2009-04-19 21:09 [Bug c/39819] New: " david dot brown at hesbynett dot no
@ 2009-04-19 22:26 ` eric dot weddington at atmel dot com
  2009-08-21 19:28 ` eric dot weddington at atmel dot com
  1 sibling, 0 replies; 3+ messages in thread
From: eric dot weddington at atmel dot com @ 2009-04-19 22:26 UTC (permalink / raw)
  To: gcc-bugs



-- 

eric dot weddington at atmel dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eric dot weddington at atmel
                   |                            |dot com
           Severity|enhancement                 |normal
          Component|c                           |target
   GCC host triplet|mingw                       |
 GCC target triplet|avr-gcc                     |avr-*-*
           Keywords|                            |missed-optimization
            Summary|Missed optimisation when    |[avr] Missed optimisation
                   |setting 4-byte values       |when setting 4-byte values


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


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

end of thread, other threads:[~2011-07-02 21:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-39819-4@http.gcc.gnu.org/bugzilla/>
2011-07-02 21:25 ` [Bug target/39819] [avr] Missed optimisation when setting 4-byte values gjl at gcc dot gnu.org
2009-04-19 21:09 [Bug c/39819] New: " david dot brown at hesbynett dot no
2009-04-19 22:26 ` [Bug target/39819] [avr] " eric dot weddington at atmel dot com
2009-08-21 19:28 ` eric dot weddington at atmel 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).