public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/18002] New:  [3.4/4.0 Regression] 'while' loop performace regression on avr target
@ 2004-10-14 19:48 berndtrog at yahoo dot com
  2004-10-14 20:04 ` [Bug middle-end/18002] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: berndtrog at yahoo dot com @ 2004-10-14 19:48 UTC (permalink / raw)
  To: gcc-bugs

Hello,
when I compile(avr-gcc -c -Os -mmcu=atmega8 test.c) this code:

int main (void)
{
 while (((*(volatile unsigned char *)((0x0B) + 0x20)) & (1<<5)) == 0) {
  ;
 }

 return (0);
}

with gcc 3.3.1 I get this asm loop:

   8:   5d 9b           sbis    0x0b, 5 ; 11
   a:   fe cf           rjmp    .-4             ; 0x8


with gcc 3.4.2 or 4.0.0 I get this:

   8:   41 e0           ldi     r20, 0x01       ; 1
   a:   50 e0           ldi     r21, 0x00       ; 0 
   c:   8b b1           in      r24, 0x0b       ; 11
   e:   99 27           eor     r25, r25
  10:   25 e0           ldi     r18, 0x05       ; 5
  12:   96 95           lsr     r25
  14:   87 95           ror     r24
  16:   2a 95           dec     r18
  18:   e1 f7           brne    .-8             ; 0x12
  1a:   84 27           eor     r24, r20
  1c:   95 27           eor     r25, r21
  1e:   9c 01           movw    r18, r24
  20:   21 70           andi    r18, 0x01       ; 1
  22:   30 70           andi    r19, 0x00       ; 0
  24:   80 fd           sbrc    r24, 0
  26:   f2 cf           rjmp    .-28            ; 0xc

-- 
           Summary:  [3.4/4.0 Regression] 'while' loop performace regression
                    on avr target
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: berndtrog at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: avr-elf


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


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

end of thread, other threads:[~2004-12-14  2:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-14 19:48 [Bug target/18002] New: [3.4/4.0 Regression] 'while' loop performace regression on avr target berndtrog at yahoo dot com
2004-10-14 20:04 ` [Bug middle-end/18002] " pinskia at gcc dot gnu dot org
2004-10-15 20:16 ` dje at gcc dot gnu dot org
2004-10-18 18:47 ` [Bug rtl-optimization/18002] " cvs-commit at gcc dot gnu dot org
2004-10-25 21:42 ` [Bug target/18002] [4.0/3.4 " pinskia at gcc dot gnu dot org
2004-10-28 16:23 ` pinskia at gcc dot gnu dot org
2004-11-01  0:44 ` mmitchel at gcc dot gnu dot org
2004-12-09 12:50 ` [Bug target/18002] [3.4/4.0 " giovannibajo at libero dot it
2004-12-11  1:49 ` cvs-commit at gcc dot gnu dot org
2004-12-11  7:41 ` [Bug target/18002] [3.4 " pinskia at gcc dot gnu dot org
2004-12-14  1:47 ` cvs-commit at gcc dot gnu dot org
2004-12-14  2:08 ` pinskia at gcc dot gnu dot 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).