public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/24001] New: Simple redundancy not eliminated
@ 2005-09-21 16:06 falk at debian dot org
2005-09-21 16:32 ` [Bug tree-optimization/24001] " pinskia at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: falk at debian dot org @ 2005-09-21 16:06 UTC (permalink / raw)
To: gcc-bugs
For this code:
int f(int *ptr, int t) {
if (t)
return *ptr;
else
return *ptr;
}
the jump is not eliminated:
f: beq $17,$L2
ldl $0,0($16)
ret
$L2: ldl $0,0($16)
ret
This used to work with 2.95 (not sure whether that still counts as
regression...), but not with 3.3, 3.4, 4.0, or 4.1.0 20050915.
--
Summary: Simple redundancy not eliminated
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: falk at debian dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: alpha-linux-gnu
GCC host triplet: alpha-linux-gnu
GCC target triplet: alpha-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24001
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/24001] Simple redundancy not eliminated
2005-09-21 16:06 [Bug tree-optimization/24001] New: Simple redundancy not eliminated falk at debian dot org
@ 2005-09-21 16:32 ` pinskia at gcc dot gnu dot org
2005-09-22 8:31 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-21 16:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-21 16:32 -------
Try with -Os and you will see it is eliminated.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24001
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/24001] Simple redundancy not eliminated
2005-09-21 16:06 [Bug tree-optimization/24001] New: Simple redundancy not eliminated falk at debian dot org
2005-09-21 16:32 ` [Bug tree-optimization/24001] " pinskia at gcc dot gnu dot org
@ 2005-09-22 8:31 ` rguenth at gcc dot gnu dot org
2005-09-22 18:40 ` Daniel Berlin
2005-09-22 18:40 ` dberlin at dberlin dot org
2005-09-25 4:31 ` pinskia at gcc dot gnu dot org
3 siblings, 1 reply; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-09-22 8:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-22 08:31 -------
load-pre should sink the load and fix the problem at the tree level.
GCSE does it at rtl level for both -O2 and -Os on i686, so maybe costs on
alpha are weird enough to prevent it from doing its work at -O2?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24001
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/24001] Simple redundancy not eliminated
2005-09-21 16:06 [Bug tree-optimization/24001] New: Simple redundancy not eliminated falk at debian dot org
2005-09-21 16:32 ` [Bug tree-optimization/24001] " pinskia at gcc dot gnu dot org
2005-09-22 8:31 ` rguenth at gcc dot gnu dot org
@ 2005-09-22 18:40 ` dberlin at dberlin dot org
2005-09-25 4:31 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: dberlin at dberlin dot org @ 2005-09-22 18:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dberlin at gcc dot gnu dot org 2005-09-22 18:40 -------
Subject: Re: Simple redundancy not eliminated
On Thu, 2005-09-22 at 08:31 +0000, rguenth at gcc dot gnu dot org wrote:
> ------- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-22 08:31 -------
> load-pre should sink the load and fix the problem at the tree level.
Uh, load PRE doesn't sink loads, it would lift it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24001
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/24001] Simple redundancy not eliminated
2005-09-21 16:06 [Bug tree-optimization/24001] New: Simple redundancy not eliminated falk at debian dot org
` (2 preceding siblings ...)
2005-09-22 18:40 ` dberlin at dberlin dot org
@ 2005-09-25 4:31 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-25 4:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-25 04:31 -------
Confirmed, on most targets (ppc and x86 at least) this is done at the rtl level, I don't know why it is not
done for alpha.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
GCC build triplet|alpha-linux-gnu |
GCC host triplet|alpha-linux-gnu |
Keywords| |TREE
Last reconfirmed|0000-00-00 00:00:00 |2005-09-25 04:31:17
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24001
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-09-25 4:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-21 16:06 [Bug tree-optimization/24001] New: Simple redundancy not eliminated falk at debian dot org
2005-09-21 16:32 ` [Bug tree-optimization/24001] " pinskia at gcc dot gnu dot org
2005-09-22 8:31 ` rguenth at gcc dot gnu dot org
2005-09-22 18:40 ` Daniel Berlin
2005-09-22 18:40 ` dberlin at dberlin dot org
2005-09-25 4:31 ` 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).