public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/28173]  New: 4.1.1 misses constant folding .
@ 2006-06-26 20:10 ramana dot radhakrishnan at codito dot com
  2006-06-28 23:34 ` [Bug regression/28173] [4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: ramana dot radhakrishnan at codito dot com @ 2006-06-26 20:10 UTC (permalink / raw)
  To: gcc-bugs

A performance regression from 3.4.6 to 4.1.1 for m68k-elf.
combine used to take care of this in 3.4.6   . 

A backport of the patch for Bug #24427 works .  If its allowed, I'll put it up
. 

This is the test case . 

#include <stdio.h>
int i;
int main (void)
{

          if ( ((i & ~1) | 1) != ( i | 1))
                      printf ("abc");
}

3.4.6 generated 

       .file   "fail.c"
        .text
        .align  2
        .globl  foo
        .type   foo, @function
foo:
        link.w %a6,#0
        unlk %a6
        rts
        .size   foo, .-foo
        .comm   i,4,2
        .ident  "GCC: (GNU) 3.4.6"



4.1.2 pre-release generates      

.file   "fail.c"
        .section        .rodata.str1.1,"aMS",@progbits,1
.LC0:
        .string "abc"
        .text
        .align  2
        .globl  main
        .type   main, @function
main:
        link.w %fp,#0
        move.l %d2,-(%sp)
        move.l i,%d1
        moveq #-2,%d0
        and.l %d1,%d0
        moveq #1,%d2
        or.l %d2,%d0
        or.l %d2,%d1
        cmp.l %d0,%d1
        jbeq .L5
        pea .LC0
        jbsr printf
        addq.l #4,%sp
.L5:
        move.l -4(%fp),%d2
        unlk %fp
        rts
        .size   main, .-main
        .comm   i,4,2
        .ident  "GCC: (GNU) 4.1.2 20060623 (prerelease)"


-- 
           Summary: 4.1.1 misses constant folding .
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: regression
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ramana dot radhakrishnan at codito dot com
  GCC host triplet: i686-linux
GCC target triplet: m68k-elf


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


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

end of thread, other threads:[~2007-03-08  1:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-26 20:10 [Bug regression/28173] New: 4.1.1 misses constant folding ramana dot radhakrishnan at codito dot com
2006-06-28 23:34 ` [Bug regression/28173] [4.1 Regression] " pinskia at gcc dot gnu dot org
2006-09-13  3:39 ` [Bug rtl-optimization/28173] " bangerth at dealii dot org
2006-09-13  3:59 ` [Bug rtl-optimization/28173] [4.0/4.1 regression] " pinskia at gcc dot gnu dot org
2006-09-13  8:25 ` ebotcazou at gcc dot gnu dot org
2007-02-14  9:24 ` mmitchel at gcc dot gnu dot org
2007-02-18 17:10 ` sayle at gcc dot gnu dot org
2007-02-19  0:54 ` sayle at gcc dot gnu dot org
2007-03-08  1:55 ` roger at eyesopen 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).