* [Bug tree-optimization/32964] [4.3 Regression] union cause ineffient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
@ 2007-08-01 23:16 ` pinskia at gcc dot gnu dot org
2007-08-01 23:18 ` pinskia at gcc dot gnu dot org
` (17 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-01 23:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-08-01 23:16 -------
Hmm, the trunk is worse than the 4.2 branch for -msse2 -mfpmath=sse.
Trunk:
.L2:
movss -4(%ebp), %xmm1
addl $1, %eax
cmpl $100, %eax
addss %xmm0, %xmm1
movss %xmm1, -8(%ebp)
movl -8(%ebp), %edx
movl %edx, -4(%ebp)
jne .L2
4.2.0:
.L2:
movaps %xmm2, %xmm0
addl $1, %eax
addss %xmm1, %xmm0
cmpl $100, %eax
movaps %xmm0, %xmm1
jne .L2
So I guess I can mark this as a regression :).
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|union cause ineffient code |[4.3 Regression] union cause
|inside loops |ineffient code inside loops
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug tree-optimization/32964] [4.3 Regression] union cause ineffient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
2007-08-01 23:16 ` [Bug tree-optimization/32964] [4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2007-08-01 23:18 ` pinskia at gcc dot gnu dot org
2007-08-10 0:58 ` mmitchel at gcc dot gnu dot org
` (16 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-01 23:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-08-01 23:18 -------
One should note the original testcase included a vector float and a struct
inside the union and used C++, this is just a reduced testcase of the issue.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug tree-optimization/32964] [4.3 Regression] union cause ineffient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
2007-08-01 23:16 ` [Bug tree-optimization/32964] [4.3 Regression] " pinskia at gcc dot gnu dot org
2007-08-01 23:18 ` pinskia at gcc dot gnu dot org
@ 2007-08-10 0:58 ` mmitchel at gcc dot gnu dot org
2007-11-03 18:13 ` [Bug middle-end/32964] " pinskia at gcc dot gnu dot org
` (15 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-08-10 0:58 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3 Regression] union cause ineffient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-08-10 0:58 ` mmitchel at gcc dot gnu dot org
@ 2007-11-03 18:13 ` pinskia at gcc dot gnu dot org
2008-01-02 14:15 ` [Bug middle-end/32964] [4.3 Regression] union cause inefficient " rguenth at gcc dot gnu dot org
` (14 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-11-03 18:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2007-11-03 18:13 -------
Ok, looking a little into this shows this is the same issue (or at least
related to) as PR 33989. We have SImode in some places where we could use
SFmode.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |middle-end
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3 Regression] union cause inefficient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-11-03 18:13 ` [Bug middle-end/32964] " pinskia at gcc dot gnu dot org
@ 2008-01-02 14:15 ` rguenth at gcc dot gnu dot org
2008-01-04 17:04 ` rguenth at gcc dot gnu dot org
` (13 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-02 14:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2008-01-02 14:11 -------
On the tree level there is no visible regression, but we have V_MUST_DEFs and
a single SFT on the 4.2 branch while trunk does not create an extra virtual tag
for the single-field union:
<bb 2>:
# a1_12 = VDEF <a1_11(D)>
a1.a = a;
i = 0;
<bb 3>:
# VUSE <a1_23>
# a2_14 = VDEF <a2_24>
a2 = a1;
# a2_15 = VDEF <a2_14>
a2.a = a2.a + a;
# VUSE <a2_15>
# a1_16 = VDEF <a1_23>
a1 = a2;
i = i + 1;
if (i != 100)
goto <bb 3>;
else
goto <bb 4>;
but, confirmed, there is a code quality regression as noted compared to 4.2.
Also SRA could be extended to scalarize single-field unions.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |4.3.0
Known to work| |4.2.2
Last reconfirmed|0000-00-00 00:00:00 |2008-01-02 14:11:21
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3 Regression] union cause inefficient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-01-02 14:15 ` [Bug middle-end/32964] [4.3 Regression] union cause inefficient " rguenth at gcc dot gnu dot org
@ 2008-01-04 17:04 ` rguenth at gcc dot gnu dot org
2008-01-04 17:09 ` rguenth at gcc dot gnu dot org
` (12 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-04 17:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2008-01-04 16:59 -------
The plain DECL does not work because
1) we don't do the storetmp
2) can_PRE_operation and can_value_number_operation return false (so we
do not enter a into EXP_GEN
3) create_value_expr_from cannot handle it
most of the rest of PRE looks like it may handle DECLs, but if you fix the
above, vn_lookup_with_vuses still not finds VH.10, because it is not ANTIC_IN.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3 Regression] union cause inefficient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-01-04 17:04 ` rguenth at gcc dot gnu dot org
@ 2008-01-04 17:09 ` rguenth at gcc dot gnu dot org
2008-03-14 16:58 ` [Bug middle-end/32964] [4.3/4.4 " rguenth at gcc dot gnu dot org
` (11 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-04 17:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2008-01-04 16:59 -------
Doh, wrong bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3/4.4 Regression] union cause inefficient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (6 preceding siblings ...)
2008-01-04 17:09 ` rguenth at gcc dot gnu dot org
@ 2008-03-14 16:58 ` rguenth at gcc dot gnu dot org
2008-06-06 14:59 ` rguenth at gcc dot gnu dot org
` (10 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-14 16:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rguenth at gcc dot gnu dot org 2008-03-14 16:57 -------
This could be fixed by MEM_REF (but we don't lower struct copies at the moment,
doh!), or by tweaking SCCVN/FRE to also look at struct copies.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.0 |4.3.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3/4.4 Regression] union cause inefficient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (7 preceding siblings ...)
2008-03-14 16:58 ` [Bug middle-end/32964] [4.3/4.4 " rguenth at gcc dot gnu dot org
@ 2008-06-06 14:59 ` rguenth at gcc dot gnu dot org
2008-08-27 22:04 ` jsm28 at gcc dot gnu dot org
` (9 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-06 14:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2008-06-06 14:57 -------
4.3.1 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.1 |4.3.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3/4.4 Regression] union cause inefficient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (8 preceding siblings ...)
2008-06-06 14:59 ` rguenth at gcc dot gnu dot org
@ 2008-08-27 22:04 ` jsm28 at gcc dot gnu dot org
2009-01-24 10:24 ` rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-08-27 22:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jsm28 at gcc dot gnu dot org 2008-08-27 22:02 -------
4.3.2 is released, changing milestones to 4.3.3.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.2 |4.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3/4.4 Regression] union cause inefficient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (9 preceding siblings ...)
2008-08-27 22:04 ` jsm28 at gcc dot gnu dot org
@ 2009-01-24 10:24 ` rguenth at gcc dot gnu dot org
2009-02-01 8:07 ` bonzini at gnu dot org
` (7 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-24 10:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from rguenth at gcc dot gnu dot org 2009-01-24 10:19 -------
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=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3/4.4 Regression] union cause inefficient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (10 preceding siblings ...)
2009-01-24 10:24 ` rguenth at gcc dot gnu dot org
@ 2009-02-01 8:07 ` bonzini at gnu dot org
2009-02-01 10:40 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: bonzini at gnu dot org @ 2009-02-01 8:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from bonzini at gnu dot org 2009-02-01 08:07 -------
still present.
--
bonzini at gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2008-03-25 03:46:33 |2009-02-01 08:07:23
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3/4.4 Regression] union cause inefficient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (11 preceding siblings ...)
2009-02-01 8:07 ` bonzini at gnu dot org
@ 2009-02-01 10:40 ` rguenth at gcc dot gnu dot org
2009-02-06 21:45 ` jamborm at gcc dot gnu dot org
` (5 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-02-01 10:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2009-02-01 10:40 -------
New SRA should fix this.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mjambor at suse dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3/4.4 Regression] union cause inefficient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (12 preceding siblings ...)
2009-02-01 10:40 ` rguenth at gcc dot gnu dot org
@ 2009-02-06 21:45 ` jamborm at gcc dot gnu dot org
2009-05-22 21:07 ` [Bug middle-end/32964] [4.3/4.4/4.5 " rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2009-02-06 21:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from jamborm at gcc dot gnu dot org 2009-02-06 21:45 -------
Indeed, this testcase is fully scalarized by the new SRA even as it is
today. (If you don't know what new SRA I mean, I hope I'll post it to
the list as an RFC next week).
--
jamborm at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jamborm at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3/4.4/4.5 Regression] union cause inefficient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (13 preceding siblings ...)
2009-02-06 21:45 ` jamborm at gcc dot gnu dot org
@ 2009-05-22 21:07 ` rguenth at gcc dot gnu dot org
2009-08-04 12:36 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-05-22 21:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from rguenth at gcc dot gnu dot org 2009-05-22 21:06 -------
If not something for SRA then this needs PRE. But then phi-translation needs
to be able to translate through struct copies as well.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3/4.4/4.5 Regression] union cause inefficient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (14 preceding siblings ...)
2009-05-22 21:07 ` [Bug middle-end/32964] [4.3/4.4/4.5 " rguenth at gcc dot gnu dot org
@ 2009-08-04 12:36 ` rguenth at gcc dot gnu dot org
2009-08-06 11:55 ` jamborm at gcc dot gnu dot org
` (2 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from rguenth at gcc dot gnu dot org 2009-08-04 12:28 -------
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=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3/4.4/4.5 Regression] union cause inefficient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (15 preceding siblings ...)
2009-08-04 12:36 ` rguenth at gcc dot gnu dot org
@ 2009-08-06 11:55 ` jamborm at gcc dot gnu dot org
2009-08-06 12:09 ` [Bug middle-end/32964] [4.3/4.4 " jamborm at gcc dot gnu dot org
2010-05-22 18:19 ` rguenth at gcc dot gnu dot org
18 siblings, 0 replies; 20+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2009-08-06 11:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from jamborm at gcc dot gnu dot org 2009-08-06 11:55 -------
Subject: Bug 32964
Author: jamborm
Date: Thu Aug 6 11:55:30 2009
New Revision: 150523
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150523
Log:
2009-08-06 Martin Jambor <mjambor@suse.cz>
PR middle-end/32964
* testsuite/gcc.dg/tree-ssa/pr32964.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr32964.c
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3/4.4 Regression] union cause inefficient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (16 preceding siblings ...)
2009-08-06 11:55 ` jamborm at gcc dot gnu dot org
@ 2009-08-06 12:09 ` jamborm at gcc dot gnu dot org
2010-05-22 18:19 ` rguenth at gcc dot gnu dot org
18 siblings, 0 replies; 20+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2009-08-06 12:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from jamborm at gcc dot gnu dot org 2009-08-06 12:09 -------
New SRA scalarizes the unions in this testcase and so this is no
longer a 4.5 regression. I have committed a testcase for reference
and am updating relevant bugzilla tags/summary now.
As I won't be backporting new SRA to any of the regressing versions, I
am no longer really interested in this bug and will remove myself from
the CC list too. Feel free to re-add me if anything I should know
about arises.
--
jamborm at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|mjambor at suse dot cz, |
|jamborm at gcc dot gnu dot |
|org |
Known to work|4.2.2 |4.2.2 4.5.0
Summary|[4.3/4.4/4.5 Regression] |[4.3/4.4 Regression] union
|union cause inefficient code|cause inefficient code
|inside loops |inside loops
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32964
^ permalink raw reply [flat|nested] 20+ messages in thread
* [Bug middle-end/32964] [4.3/4.4 Regression] union cause inefficient code inside loops
2007-08-01 23:11 [Bug tree-optimization/32964] New: union cause ineffient code inside loops pinskia at gcc dot gnu dot org
` (17 preceding siblings ...)
2009-08-06 12:09 ` [Bug middle-end/32964] [4.3/4.4 " jamborm at gcc dot gnu dot org
@ 2010-05-22 18:19 ` rguenth at gcc dot gnu dot org
18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-22 18:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from rguenth at gcc dot gnu dot org 2010-05-22 18:11 -------
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=32964
^ permalink raw reply [flat|nested] 20+ messages in thread