public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/42961] New: [4.5 regression] IRA register preferencing bug
@ 2010-02-04 22:05 hubicka at gcc dot gnu dot org
2010-02-05 10:18 ` [Bug middle-end/42961] " rguenth at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2010-02-04 22:05 UTC (permalink / raw)
To: gcc-bugs
For following testcase:
int e,f;
float
main(float d,float c)
{
float a;
float e;
if (e)
a=d, e=c;
else
a=c, c=e;
if (f)
e=a;
return e;
}
(it looks artifical, but all the moves are there just to make "a" to be only
source or destination of reg-reg move that is not that uncommon in real world
code)
we generate completely bogus:
main:
.LFB0:
.cfi_startproc
xorps %xmm2, %xmm2
movss %xmm1, -4(%rsp)
movl -4(%rsp), %eax
ucomiss %xmm2, %xmm2
jp .L7
je .L3
.L7:
movss %xmm0, -4(%rsp)
movl -4(%rsp), %eax
movaps %xmm1, %xmm2
.L3:
movl f(%rip), %edx
testl %edx, %edx
je .L4
movl %eax, -4(%rsp)
movss -4(%rsp), %xmm2
.L4:
movaps %xmm2, %xmm0
ret
instead of
main:
.LFB2:
movaps %xmm0, %xmm3
xorps %xmm0, %xmm0
movaps %xmm1, %xmm2
ucomiss %xmm0, %xmm0
jp .L2
je .L3
.L2:
movaps %xmm3, %xmm2
movaps %xmm1, %xmm0
.L3:
movl f(%rip), %eax
testl %eax, %eax
je .L4
movaps %xmm2, %xmm0
.L4:
rep
ret
.LFE2:
generated by GCC 4.3.2.
The problem is that IRA concludes wrong register preferencing:
a3 (r62,l0) best SSE_REGS, cover SSE_REGS
a2 (r61,l0) best SSE_FIRST_REG, cover SSE_REGS
a1 (r59,l0) best GENERAL_REGS, cover GENERAL_REGS
a0 (r58,l0) best SSE_FIRST_REG, cover SSE_REGS
this is because of movdf pattern having alternative for general regs.
This alternative is however useful primarily when the value is temporary for
mem-mem moves, and IRA should be able to work this out.
--
Summary: [4.5 regression] IRA register preferencing bug
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hubicka at gcc dot gnu dot org
GCC host triplet: x86_64-linux
GCC target triplet: x86_64-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42961
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/42961] [4.5 regression] IRA register preferencing bug
2010-02-04 22:05 [Bug middle-end/42961] New: [4.5 regression] IRA register preferencing bug hubicka at gcc dot gnu dot org
@ 2010-02-05 10:18 ` rguenth at gcc dot gnu dot org
2010-02-05 10:52 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-02-05 10:18 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization, ra
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42961
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/42961] [4.5 regression] IRA register preferencing bug
2010-02-04 22:05 [Bug middle-end/42961] New: [4.5 regression] IRA register preferencing bug hubicka at gcc dot gnu dot org
2010-02-05 10:18 ` [Bug middle-end/42961] " rguenth at gcc dot gnu dot org
@ 2010-02-05 10:52 ` rguenth at gcc dot gnu dot org
2010-02-07 14:59 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-02-05 10:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2010-02-05 10:52 -------
*** Bug 42969 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42961
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/42961] [4.5 regression] IRA register preferencing bug
2010-02-04 22:05 [Bug middle-end/42961] New: [4.5 regression] IRA register preferencing bug hubicka at gcc dot gnu dot org
2010-02-05 10:18 ` [Bug middle-end/42961] " rguenth at gcc dot gnu dot org
2010-02-05 10:52 ` rguenth at gcc dot gnu dot org
@ 2010-02-07 14:59 ` rguenth at gcc dot gnu dot org
2010-02-10 9:26 ` hubicka at ucw dot cz
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-02-07 14:59 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.3.4
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42961
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/42961] [4.5 regression] IRA register preferencing bug
2010-02-04 22:05 [Bug middle-end/42961] New: [4.5 regression] IRA register preferencing bug hubicka at gcc dot gnu dot org
` (2 preceding siblings ...)
2010-02-07 14:59 ` rguenth at gcc dot gnu dot org
@ 2010-02-10 9:26 ` hubicka at ucw dot cz
2010-03-20 13:02 ` steven at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hubicka at ucw dot cz @ 2010-02-10 9:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from hubicka at ucw dot cz 2010-02-10 09:26 -------
Subject: Re: New: [4.5 regression] IRA register
preferencing bug
Hi,
note that it is related to way we compute cost through alternatives.
I had very old patch for this
http://www.x86-64.org/pipermail/patches/2001-February/001071.html
that would eventually help to remove the '#' constraints on all FP operations
that are there
to avoid RA from mixing integer and FP classes. Perhaps IRA can now do
something similar
and actually propagate the info?
Honza
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42961
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/42961] [4.5 regression] IRA register preferencing bug
2010-02-04 22:05 [Bug middle-end/42961] New: [4.5 regression] IRA register preferencing bug hubicka at gcc dot gnu dot org
` (3 preceding siblings ...)
2010-02-10 9:26 ` hubicka at ucw dot cz
@ 2010-03-20 13:02 ` steven at gcc dot gnu dot org
2010-04-06 11:26 ` rguenth at gcc dot gnu dot org
2010-07-31 9:35 ` [Bug middle-end/42961] [4.5/4.6 " rguenth at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-03-20 13:02 UTC (permalink / raw)
To: gcc-bugs
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-03-20 13:01:50
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42961
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/42961] [4.5 regression] IRA register preferencing bug
2010-02-04 22:05 [Bug middle-end/42961] New: [4.5 regression] IRA register preferencing bug hubicka at gcc dot gnu dot org
` (4 preceding siblings ...)
2010-03-20 13:02 ` steven at gcc dot gnu dot org
@ 2010-04-06 11:26 ` rguenth at gcc dot gnu dot org
2010-07-31 9:35 ` [Bug middle-end/42961] [4.5/4.6 " rguenth at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-06 11:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2010-04-06 11:20 -------
GCC 4.5.0 is being released. Deferring to 4.5.1.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.5.0 |4.5.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42961
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/42961] [4.5/4.6 regression] IRA register preferencing bug
2010-02-04 22:05 [Bug middle-end/42961] New: [4.5 regression] IRA register preferencing bug hubicka at gcc dot gnu dot org
` (5 preceding siblings ...)
2010-04-06 11:26 ` rguenth at gcc dot gnu dot org
@ 2010-07-31 9:35 ` rguenth at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-31 9:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2010-07-31 09:29 -------
GCC 4.5.1 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.5.1 |4.5.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42961
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-07-31 9:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-04 22:05 [Bug middle-end/42961] New: [4.5 regression] IRA register preferencing bug hubicka at gcc dot gnu dot org
2010-02-05 10:18 ` [Bug middle-end/42961] " rguenth at gcc dot gnu dot org
2010-02-05 10:52 ` rguenth at gcc dot gnu dot org
2010-02-07 14:59 ` rguenth at gcc dot gnu dot org
2010-02-10 9:26 ` hubicka at ucw dot cz
2010-03-20 13:02 ` steven at gcc dot gnu dot org
2010-04-06 11:26 ` rguenth at gcc dot gnu dot org
2010-07-31 9:35 ` [Bug middle-end/42961] [4.5/4.6 " rguenth 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).