public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/35542] New: fwprop only propagates one operand
@ 2008-03-11 20:32 hutchinsonandy at aim dot com
2008-03-11 20:35 ` [Bug rtl-optimization/35542] " hutchinsonandy at aim dot com
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: hutchinsonandy at aim dot com @ 2008-03-11 20:32 UTC (permalink / raw)
To: gcc-bugs
fwprop.c currently has a bug where a successful propagation to one operand
of an instruction will prevent propagation to any remaining operands.
The cause is due to the use of loc_mentioned_in_p() to check that a reference,
provided by earlier DF scan, still exist in an instruction.
The test is intended to check that an earlier propagation and simplification
has not removed D/U references.
However, loc_mentioned_in_p(), compares addresses of rtx to determine
equivalence. If an instruction has already been modified and simplified, this
will
longer apply - even if the def/use is still valid.
This problem was already noted in Nov, but no bug report seems to have been
filed.
http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00170.html
I will attach patch, that uses reg_mentioned_p() as a substitute. The only
differences I noted where:
a) reg_mentioned_p() does not match physical sub registers of longer hard
registers.
This seems to have no consequence since fwprop entirely rejects hard_registers
in latter code. Perhaps for clarity, hard registers could be ignored earlier.
b) registers in asm_operands are found. Which seems beneficial if they are
pseudos and again ignored if they are hard registers.
I am only able to test this with AVR port. In that it was 100% successful with
no
regressions of torture/execute testsuite.
--
Summary: fwprop only propagates one operand
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hutchinsonandy at aim dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35542
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/35542] fwprop only propagates one operand
2008-03-11 20:32 [Bug rtl-optimization/35542] New: fwprop only propagates one operand hutchinsonandy at aim dot com
@ 2008-03-11 20:35 ` hutchinsonandy at aim dot com
2008-04-02 9:57 ` bonzini at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: hutchinsonandy at aim dot com @ 2008-03-11 20:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from hutchinsonandy at aim dot com 2008-03-11 20:34 -------
Created an attachment (id=15300)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15300&action=view)
Patch to search modified instruction for register.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35542
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/35542] fwprop only propagates one operand
2008-03-11 20:32 [Bug rtl-optimization/35542] New: fwprop only propagates one operand hutchinsonandy at aim dot com
2008-03-11 20:35 ` [Bug rtl-optimization/35542] " hutchinsonandy at aim dot com
@ 2008-04-02 9:57 ` bonzini at gcc dot gnu dot org
2008-04-02 9:57 ` [Bug rtl-optimization/35542] [4.3 Regression] " bonzini at gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2008-04-02 9:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from bonzini at gnu dot org 2008-04-02 09:57 -------
Subject: Bug 35542
Author: bonzini
Date: Wed Apr 2 09:56:17 2008
New Revision: 133829
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133829
Log:
2008-04-02 Andy Hutchinson <hutchinsonamdy@aim.com>
PR rtl-optimization/35542
* fwprop.c (forward_propagate_and_simplify): Replace
loc_reg_mentioned_in_p with reg_mentioned_p.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fwprop.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35542
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/35542] [4.3 Regression] fwprop only propagates one operand
2008-03-11 20:32 [Bug rtl-optimization/35542] New: fwprop only propagates one operand hutchinsonandy at aim dot com
2008-03-11 20:35 ` [Bug rtl-optimization/35542] " hutchinsonandy at aim dot com
2008-04-02 9:57 ` bonzini at gcc dot gnu dot org
@ 2008-04-02 9:57 ` bonzini at gnu dot org
2008-04-02 15:22 ` eric dot weddington at atmel dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bonzini at gnu dot org @ 2008-04-02 9:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from bonzini at gnu dot org 2008-04-02 09:57 -------
committed to trunk, will backport to 4.3 in due time (causes regressions for
AVR)
--
bonzini at gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |bonzini at gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Known to fail| |4.3.0
Known to work| |4.4.0
Last reconfirmed|0000-00-00 00:00:00 |2008-04-02 09:57:10
date| |
Summary|fwprop only propagates one |[4.3 Regression] fwprop only
|operand |propagates one operand
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35542
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/35542] [4.3 Regression] fwprop only propagates one operand
2008-03-11 20:32 [Bug rtl-optimization/35542] New: fwprop only propagates one operand hutchinsonandy at aim dot com
` (2 preceding siblings ...)
2008-04-02 9:57 ` [Bug rtl-optimization/35542] [4.3 Regression] " bonzini at gnu dot org
@ 2008-04-02 15:22 ` eric dot weddington at atmel dot com
2008-04-02 15:26 ` bonzini at gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: eric dot weddington at atmel dot com @ 2008-04-02 15:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from eric dot weddington at atmel dot com 2008-04-02 15:21 -------
(In reply to comment #3)
> committed to trunk, will backport to 4.3 in due time (causes regressions for
> AVR)
>
Could you list what fails?
Thanks!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35542
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/35542] [4.3 Regression] fwprop only propagates one operand
2008-03-11 20:32 [Bug rtl-optimization/35542] New: fwprop only propagates one operand hutchinsonandy at aim dot com
` (3 preceding siblings ...)
2008-04-02 15:22 ` eric dot weddington at atmel dot com
@ 2008-04-02 15:26 ` bonzini at gnu dot org
2008-04-02 15:45 ` hutchinsonandy at aim dot com
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bonzini at gnu dot org @ 2008-04-02 15:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from bonzini at gnu dot org 2008-04-02 15:25 -------
I meant that this is a patch that is scheduled for backporting to 4.3, because
it fixes regressions on AVR.
The text between parentheses should have been "bug causes regressions for AVR".
Sorry.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35542
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/35542] [4.3 Regression] fwprop only propagates one operand
2008-03-11 20:32 [Bug rtl-optimization/35542] New: fwprop only propagates one operand hutchinsonandy at aim dot com
` (4 preceding siblings ...)
2008-04-02 15:26 ` bonzini at gnu dot org
@ 2008-04-02 15:45 ` hutchinsonandy at aim dot com
2008-04-29 8:20 ` aoliva at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: hutchinsonandy at aim dot com @ 2008-04-02 15:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from hutchinsonandy at aim dot com 2008-04-02 15:44 -------
Subject: Re: [4.3 Regression] fwprop only propagates
one operand
Eric,
it's difficult to give you a specfic example as the propagation is very
sensitive to generated code. I found this looking at other AVR bugs and
discovered it was not working. (I'll look up that example latter for
you).
It not an obvious thing as other (good) changes due to DF merge,
re-arrange code enough to obscure the omission. But the result is an
extra move or redundant instruction here and there.
(its also not at all specfic to AVR)
Andy
-----Original Message-----
From: eric dot weddington at atmel dot com <gcc-bugzilla@gcc.gnu.org>
To: hutchinsonandy@aim.com
Sent: Wed, 2 Apr 2008 10:21 am
Subject: [Bug rtl-optimization/35542] [4.3 Regression] fwprop only
propagates one operand
------- Comment #4 from eric dot weddington at atmel dot com
2008-04-02 15:21
-------
(In reply to comment #3)
> committed to trunk, will backport to 4.3 in due time (causes
regressions for
> AVR)
>
Could you list what fails?
Thanks!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35542
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35542
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/35542] [4.3 Regression] fwprop only propagates one operand
2008-03-11 20:32 [Bug rtl-optimization/35542] New: fwprop only propagates one operand hutchinsonandy at aim dot com
` (5 preceding siblings ...)
2008-04-02 15:45 ` hutchinsonandy at aim dot com
@ 2008-04-29 8:20 ` aoliva at gcc dot gnu dot org
2008-06-11 11:10 ` jsm28 at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2008-04-29 8:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from aoliva at gcc dot gnu dot org 2008-04-29 08:19 -------
Subject: Bug 35542
Author: aoliva
Date: Tue Apr 29 08:18:36 2008
New Revision: 134782
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134782
Log:
* fwprop.c (forward_propagate_and_simplify): Replace entire
var location rtx. Revert part of 2007-11-08 obviated by:
2008-04-02 Andy Hutchinson <hutchinsonamdy@aim.com>
PR rtl-optimization/35542
* fwprop.c (forward_propagate_and_simplify): Replace
loc_reg_mentioned_in_p with reg_mentioned_p.
Modified:
branches/var-tracking-assignments-branch/gcc/ChangeLog.vta
branches/var-tracking-assignments-branch/gcc/fwprop.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35542
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/35542] [4.3 Regression] fwprop only propagates one operand
2008-03-11 20:32 [Bug rtl-optimization/35542] New: fwprop only propagates one operand hutchinsonandy at aim dot com
` (6 preceding siblings ...)
2008-04-29 8:20 ` aoliva at gcc dot gnu dot org
@ 2008-06-11 11:10 ` jsm28 at gcc dot gnu dot org
2008-06-12 10:16 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-06-11 11:10 UTC (permalink / raw)
To: gcc-bugs
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35542
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/35542] [4.3 Regression] fwprop only propagates one operand
2008-03-11 20:32 [Bug rtl-optimization/35542] New: fwprop only propagates one operand hutchinsonandy at aim dot com
` (7 preceding siblings ...)
2008-06-11 11:10 ` jsm28 at gcc dot gnu dot org
@ 2008-06-12 10:16 ` jakub at gcc dot gnu dot org
2008-08-01 9:55 ` bonzini at gnu dot org
2008-08-01 9:56 ` bonzini at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-06-12 10:16 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35542
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/35542] [4.3 Regression] fwprop only propagates one operand
2008-03-11 20:32 [Bug rtl-optimization/35542] New: fwprop only propagates one operand hutchinsonandy at aim dot com
` (8 preceding siblings ...)
2008-06-12 10:16 ` jakub at gcc dot gnu dot org
@ 2008-08-01 9:55 ` bonzini at gnu dot org
2008-08-01 9:56 ` bonzini at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: bonzini at gnu dot org @ 2008-08-01 9:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from bonzini at gnu dot org 2008-08-01 09:54 -------
backported
--
bonzini at gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to work|4.4.0 |4.4.0 4.3.2
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35542
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug rtl-optimization/35542] [4.3 Regression] fwprop only propagates one operand
2008-03-11 20:32 [Bug rtl-optimization/35542] New: fwprop only propagates one operand hutchinsonandy at aim dot com
` (9 preceding siblings ...)
2008-08-01 9:55 ` bonzini at gnu dot org
@ 2008-08-01 9:56 ` bonzini at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2008-08-01 9:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from bonzini at gnu dot org 2008-08-01 09:55 -------
Subject: Bug 35542
Author: bonzini
Date: Fri Aug 1 09:54:04 2008
New Revision: 138505
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138505
Log:
2008-08-01 Paolo Bonzini <bonzini@gnu.org>
Backport from mainline:
2008-04-02 Andy Hutchinson <hutchinsonamdy@aim.com>
PR rtl-optimization/35542
* fwprop.c (forward_propagate_and_simplify): Replace
loc_reg_mentioned_in_p with reg_mentioned_p.
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/fwprop.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35542
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-08-01 9:56 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-11 20:32 [Bug rtl-optimization/35542] New: fwprop only propagates one operand hutchinsonandy at aim dot com
2008-03-11 20:35 ` [Bug rtl-optimization/35542] " hutchinsonandy at aim dot com
2008-04-02 9:57 ` bonzini at gcc dot gnu dot org
2008-04-02 9:57 ` [Bug rtl-optimization/35542] [4.3 Regression] " bonzini at gnu dot org
2008-04-02 15:22 ` eric dot weddington at atmel dot com
2008-04-02 15:26 ` bonzini at gnu dot org
2008-04-02 15:45 ` hutchinsonandy at aim dot com
2008-04-29 8:20 ` aoliva at gcc dot gnu dot org
2008-06-11 11:10 ` jsm28 at gcc dot gnu dot org
2008-06-12 10:16 ` jakub at gcc dot gnu dot org
2008-08-01 9:55 ` bonzini at gnu dot org
2008-08-01 9:56 ` bonzini 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).