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
* [Bug regression/28173] [4.1 Regression] 4.1.1 misses constant folding .
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 ` pinskia at gcc dot gnu dot org
2006-09-13 3:39 ` [Bug rtl-optimization/28173] " bangerth at dealii dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-28 23:34 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Summary|4.1.1 misses constant |[4.1 Regression] 4.1.1
|folding . |misses constant folding .
Target Milestone|--- |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28173
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/28173] [4.1 Regression] 4.1.1 misses constant folding .
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 ` 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
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2006-09-13 3:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from bangerth at dealii dot org 2006-09-13 03:39 -------
Confirmed. I see the same behavior on x86_64-linux-unknown-gnu. This
is a regression from 3.4.x that is present in at least the 4.0.x and 4.1.x
release branches (don't know about mainline).
W.
--
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bangerth at dealii dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC host triplet|i686-linux |
GCC target triplet|m68k-elf |
Known to fail| |4.0.3 4.1.1
Known to work| |3.4.6
Priority|P3 |P2
Last reconfirmed|0000-00-00 00:00:00 |2006-09-13 03:39:04
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28173
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/28173] [4.0/4.1 regression] misses constant folding
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 ` pinskia at gcc dot gnu dot org
2006-09-13 8:25 ` ebotcazou at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-13 3:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-09-13 03:59 -------
This is not a regression on the mainline because of PR 24427.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |24427
Summary|[4.0/4.1/4.2? regression] |[4.0/4.1 regression] misses
|misses constant folding |constant folding
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28173
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/28173] [4.0/4.1 regression] misses constant folding
2006-06-26 20:10 [Bug regression/28173] New: 4.1.1 misses constant folding ramana dot radhakrishnan at codito dot com
` (2 preceding siblings ...)
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
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2006-09-13 8:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from ebotcazou at gcc dot gnu dot org 2006-09-13 08:24 -------
Roger, could you comment on Ramana's proposition? Thanks in advance.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sayle at gcc dot gnu dot
| |org, ebotcazou at gcc dot
| |gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28173
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/28173] [4.0/4.1 regression] misses constant folding
2006-06-26 20:10 [Bug regression/28173] New: 4.1.1 misses constant folding ramana dot radhakrishnan at codito dot com
` (3 preceding siblings ...)
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
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14 9:24 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.2 |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28173
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/28173] [4.0/4.1 regression] misses constant folding
2006-06-26 20:10 [Bug regression/28173] New: 4.1.1 misses constant folding ramana dot radhakrishnan at codito dot com
` (4 preceding siblings ...)
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
7 siblings, 0 replies; 9+ messages in thread
From: sayle at gcc dot gnu dot org @ 2007-02-18 17:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from sayle at gcc dot gnu dot org 2007-02-18 17:10 -------
Subject: Bug 28173
Author: sayle
Date: Sun Feb 18 17:10:19 2007
New Revision: 122100
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122100
Log:
Backport from mainline.
PR middle-end/24427
PR rtl-optimization/28173
* fold-const.c (fold_binary) <BIT_IOR_EXPR>: Transform (X&C1)|C2
into (X,C2) if C1 is a subset of the bits of C2. Transform
(X&C1)|C2 into X|C2 if C1|C2 == ~0. Canonicalize (X&C1)|C2 as
(X&(C1&~C2))|C2.
<BIT_AND_EXPR>: Canonicalize (X|C1)&C2 as (X&C2)|(C1&C2).
* gcc.dg/tree-ssa/andor-1.c: New test case.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/andor-1.c
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/fold-const.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28173
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/28173] [4.0/4.1 regression] misses constant folding
2006-06-26 20:10 [Bug regression/28173] New: 4.1.1 misses constant folding ramana dot radhakrishnan at codito dot com
` (5 preceding siblings ...)
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
7 siblings, 0 replies; 9+ messages in thread
From: sayle at gcc dot gnu dot org @ 2007-02-19 0:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from sayle at gcc dot gnu dot org 2007-02-19 00:54 -------
Subject: Bug 28173
Author: sayle
Date: Mon Feb 19 00:54:29 2007
New Revision: 122116
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122116
Log:
PR rtl-optimization/28173
* simplify-rtx.c (simplify_binary_operation_1) <IOR>: Optimize
(X & C1) | C2 as C2 when (C1 & C2) == C1 and X has no side-effects.
Optimize (X & C1) | C2 as X | C2 when (C1 | C2) == ~0.
Canonicalize (X & C1) | C2 as (X & (C1 & ~C2)) | C2.
<AND>: Canonicalize (X | C1) & C2 as (X & C2) | (C1 & C2).
* gcc.target/i386/andor-1.c: New test case.
Added:
trunk/gcc/testsuite/gcc.target/i386/andor-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/simplify-rtx.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28173
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/28173] [4.0/4.1 regression] misses constant folding
2006-06-26 20:10 [Bug regression/28173] New: 4.1.1 misses constant folding ramana dot radhakrishnan at codito dot com
` (6 preceding siblings ...)
2007-02-19 0:54 ` sayle at gcc dot gnu dot org
@ 2007-03-08 1:55 ` roger at eyesopen dot com
7 siblings, 0 replies; 9+ messages in thread
From: roger at eyesopen dot com @ 2007-03-08 1:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from roger at eyesopen dot com 2007-03-08 01:55 -------
I suspect this problem is now fully resolved. The patch for PR24427 has been
backported to the gcc-4_1-branch, and additionally on mainline, simplify-rtx.c
has been enhanced to also perform the missed-optimization at the RTL level.
Given that the 4.0 branch is now closed, I believe this is sufficient to close
this PR.
--
roger at eyesopen dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
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).