public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/37263] New: [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64
@ 2008-08-28 2:20 pinskia at gcc dot gnu dot org
2008-08-28 2:20 ` [Bug rtl-optimization/37263] " pinskia at gcc dot gnu dot org
` (12 more replies)
0 siblings, 13 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-08-28 2:20 UTC (permalink / raw)
To: gcc-bugs
Take (again):
unsigned ReverseBits (unsigned index, unsigned NumBits)
{
unsigned i, rev;
for (i = rev = 0; i < NumBits; i++)
{
rev = (rev << 1) | (index & 1);
index >>= 1;
}
return rev;
}
--- CUT ---
Currently we get:
.L.ReverseBits:
cmpdi 0,4,0
mr 0,3
li 3,0
beqlr 0
addi 9,4,-1
cmpwi 7,4,0
rldicl 9,9,0,32
addi 9,9,1
mtctr 9
beq- 7,.L8
beq- 7,.L8
But since we know that any time cmpdi r4, 0/beq is true, then cmpwi r4, 0/beq
is also. I think one of the issue is that doloop is also not generating
subregs with /s/u on them, even though the original subregs have them.
--
Summary: [4.3/4.4 Regression] extra code for doloop with unsigned
32bit types on LP64
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/37263] [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64
2008-08-28 2:20 [Bug rtl-optimization/37263] New: [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64 pinskia at gcc dot gnu dot org
@ 2008-08-28 2:20 ` pinskia at gcc dot gnu dot org
2008-08-29 4:38 ` pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-08-28 2:20 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/37263] [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64
2008-08-28 2:20 [Bug rtl-optimization/37263] New: [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64 pinskia at gcc dot gnu dot org
2008-08-28 2:20 ` [Bug rtl-optimization/37263] " pinskia at gcc dot gnu dot org
@ 2008-08-29 4:38 ` pinskia at gcc dot gnu dot org
2008-09-03 19:32 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-08-29 4:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-08-29 04:37 -------
We can optimize this by doing either of two things:
1) change iv-opts back to produce !=
2) a) have loop-iv.c keep /s/u for the subreg
b) optimize (eq (subreg/s (reg)) (const_int 0) ) to (eq (reg) (const_int
0)).
Both will fix the issue, I can test 2 as that is easy to implement and I
already have it done, I just need to test it fully.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-08-29 04:37:23
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/37263] [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64
2008-08-28 2:20 [Bug rtl-optimization/37263] New: [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64 pinskia at gcc dot gnu dot org
2008-08-28 2:20 ` [Bug rtl-optimization/37263] " pinskia at gcc dot gnu dot org
2008-08-29 4:38 ` pinskia at gcc dot gnu dot org
@ 2008-09-03 19:32 ` pinskia at gcc dot gnu dot org
2008-09-09 20:27 ` jsm28 at gcc dot gnu dot org
` (9 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-03 19:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2008-09-03 19:31 -------
ok, I think I must have over optimized something as I am now getting execution
failures. I will look into them later today. Really DFP breaks and maybe
something else.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/37263] [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64
2008-08-28 2:20 [Bug rtl-optimization/37263] New: [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64 pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-09-03 19:32 ` pinskia at gcc dot gnu dot org
@ 2008-09-09 20:27 ` jsm28 at gcc dot gnu dot org
2008-09-15 21:26 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-09-09 20:27 UTC (permalink / raw)
To: gcc-bugs
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/37263] [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64
2008-08-28 2:20 [Bug rtl-optimization/37263] New: [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64 pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-09-09 20:27 ` jsm28 at gcc dot gnu dot org
@ 2008-09-15 21:26 ` pinskia at gcc dot gnu dot org
2008-09-15 21:27 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-15 21:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2008-09-15 21:25 -------
Another testcase (which cannot be solved via subreg fix):
int f(int l, int *a)
{
int i;
if (l > 128)
for(i = 0;i < l; i++)
a[i] = i;
return l;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/37263] [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64
2008-08-28 2:20 [Bug rtl-optimization/37263] New: [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64 pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-09-15 21:26 ` pinskia at gcc dot gnu dot org
@ 2008-09-15 21:27 ` pinskia at gcc dot gnu dot org
2008-09-16 16:23 ` [Bug rtl-optimization/37263] [4.3 " pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-15 21:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2008-09-15 21:25 -------
Looks like http://www.nabble.com/-patch--Fix-nonsensical-exit-test-replacement-
td8289646.html caused the IV-opts difference.
The problem here is that the two costs are the same as we go for the
original one but we really should use elimination one as it will
provide for better optimizations later on.
The patch:
Index: tree-ssa-loop-ivopts.c
===================================================================
--- tree-ssa-loop-ivopts.c (revision 2825)
+++ tree-ssa-loop-ivopts.c (working copy)
@@ -3814,8 +3814,8 @@
fd_ivopts_data = data;
walk_tree (&cmp_iv->base, find_depends, &depends_on_express, NULL);
- /* Choose the better approach. */
- if (compare_costs (elim_cost, express_cost) < 0)
+ /* Choose the better approach, preferring the eliminating one. */
+ if (compare_costs (elim_cost, express_cost) <= 0)
{
cost = elim_cost;
depends_on = depends_on_elim;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/37263] [4.3 Regression] extra code for doloop with unsigned 32bit types on LP64
2008-08-28 2:20 [Bug rtl-optimization/37263] New: [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64 pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-09-15 21:27 ` pinskia at gcc dot gnu dot org
@ 2008-09-16 16:23 ` pinskia at gcc dot gnu dot org
2008-09-16 16:24 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-16 16:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2008-09-16 16:21 -------
Fixed at least on the trunk.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.3.0
Known to work| |4.1.1
Summary|[4.3/4.4 Regression] extra |[4.3 Regression] extra code
|code for doloop with |for doloop with unsigned
|unsigned 32bit types on LP64|32bit types on LP64
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/37263] [4.3 Regression] extra code for doloop with unsigned 32bit types on LP64
2008-08-28 2:20 [Bug rtl-optimization/37263] New: [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64 pinskia at gcc dot gnu dot org
` (6 preceding siblings ...)
2008-09-16 16:23 ` [Bug rtl-optimization/37263] [4.3 " pinskia at gcc dot gnu dot org
@ 2008-09-16 16:24 ` pinskia at gcc dot gnu dot org
2008-11-20 1:00 ` cnstar9988 at gmail dot com
` (4 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-16 16:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2008-09-16 16:23 -------
Subject: Bug 37263
Author: pinskia
Date: Tue Sep 16 16:21:35 2008
New Revision: 140395
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140395
Log:
2008-09-16 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/37263
* tree-ssa-loop-ivopts.c (determine_use_iv_cost_condition): Prefer the
eliminate IV if the cost are the same.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-loop-ivopts.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/37263] [4.3 Regression] extra code for doloop with unsigned 32bit types on LP64
2008-08-28 2:20 [Bug rtl-optimization/37263] New: [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64 pinskia at gcc dot gnu dot org
` (7 preceding siblings ...)
2008-09-16 16:24 ` pinskia at gcc dot gnu dot org
@ 2008-11-20 1:00 ` cnstar9988 at gmail dot com
2009-01-24 10:27 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: cnstar9988 at gmail dot com @ 2008-11-20 1:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from cnstar9988 at gmail dot com 2008-11-20 00:58 -------
ping...
4.3.3?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/37263] [4.3 Regression] extra code for doloop with unsigned 32bit types on LP64
2008-08-28 2:20 [Bug rtl-optimization/37263] New: [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64 pinskia at gcc dot gnu dot org
` (8 preceding siblings ...)
2008-11-20 1:00 ` cnstar9988 at gmail dot com
@ 2009-01-24 10:27 ` rguenth at gcc dot gnu dot org
2009-04-16 15:43 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-24 10:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2009-01-24 10:20 -------
GCC 4.3.3 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.3 |4.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/37263] [4.3 Regression] extra code for doloop with unsigned 32bit types on LP64
2008-08-28 2:20 [Bug rtl-optimization/37263] New: [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64 pinskia at gcc dot gnu dot org
` (9 preceding siblings ...)
2009-01-24 10:27 ` rguenth at gcc dot gnu dot org
@ 2009-04-16 15:43 ` pinskia at gcc dot gnu dot org
2009-08-04 12:42 ` rguenth at gcc dot gnu dot org
2010-05-22 18:26 ` rguenth at gcc dot gnu dot org
12 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-16 15:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pinskia at gcc dot gnu dot org 2009-04-16 15:43 -------
I am no longer working on this one.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|pinskia at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/37263] [4.3 Regression] extra code for doloop with unsigned 32bit types on LP64
2008-08-28 2:20 [Bug rtl-optimization/37263] New: [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64 pinskia at gcc dot gnu dot org
` (10 preceding siblings ...)
2009-04-16 15:43 ` pinskia at gcc dot gnu dot org
@ 2009-08-04 12:42 ` rguenth at gcc dot gnu dot org
2010-05-22 18:26 ` rguenth at gcc dot gnu dot org
12 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from rguenth at gcc dot gnu dot org 2009-08-04 12:29 -------
GCC 4.3.4 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.4 |4.3.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/37263] [4.3 Regression] extra code for doloop with unsigned 32bit types on LP64
2008-08-28 2:20 [Bug rtl-optimization/37263] New: [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64 pinskia at gcc dot gnu dot org
` (11 preceding siblings ...)
2009-08-04 12:42 ` rguenth at gcc dot gnu dot org
@ 2010-05-22 18:26 ` rguenth at gcc dot gnu dot org
12 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-22 18:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from rguenth at gcc dot gnu dot org 2010-05-22 18:12 -------
GCC 4.3.5 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.5 |4.3.6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37263
^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <bug-37263-4@http.gcc.gnu.org/bugzilla/>]
end of thread, other threads:[~2011-06-27 11:36 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-28 2:20 [Bug rtl-optimization/37263] New: [4.3/4.4 Regression] extra code for doloop with unsigned 32bit types on LP64 pinskia at gcc dot gnu dot org
2008-08-28 2:20 ` [Bug rtl-optimization/37263] " pinskia at gcc dot gnu dot org
2008-08-29 4:38 ` pinskia at gcc dot gnu dot org
2008-09-03 19:32 ` pinskia at gcc dot gnu dot org
2008-09-09 20:27 ` jsm28 at gcc dot gnu dot org
2008-09-15 21:26 ` pinskia at gcc dot gnu dot org
2008-09-15 21:27 ` pinskia at gcc dot gnu dot org
2008-09-16 16:23 ` [Bug rtl-optimization/37263] [4.3 " pinskia at gcc dot gnu dot org
2008-09-16 16:24 ` pinskia at gcc dot gnu dot org
2008-11-20 1:00 ` cnstar9988 at gmail dot com
2009-01-24 10:27 ` rguenth at gcc dot gnu dot org
2009-04-16 15:43 ` pinskia at gcc dot gnu dot org
2009-08-04 12:42 ` rguenth at gcc dot gnu dot org
2010-05-22 18:26 ` rguenth at gcc dot gnu dot org
[not found] <bug-37263-4@http.gcc.gnu.org/bugzilla/>
2011-06-27 11:36 ` rguenth at gcc dot gnu.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).