public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/33790] New: postreload can handle the case where the memory locations use different modes
@ 2007-10-16 1:36 pinskia at gcc dot gnu dot org
2007-10-16 1:37 ` [Bug rtl-optimization/33790] " pinskia at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-10-16 1:36 UTC (permalink / raw)
To: gcc-bugs
Take the following testcase (either on spu-elf or powerpc-linux-gnu with
-maltivec):
#define vector __attribute__((__vector_size__(16) ))
typedef vector float vec_float4;
typedef struct {
vec_float4 data;
} VecFloat4;
typedef struct {
vec_float4 a;
vec_float4 b;
} VecFloat4x2;
VecFloat4 test1(VecFloat4 a, VecFloat4 b)
{
a.data = a.data+b.data;
return a;
}
VecFloat4x2 test2(VecFloat4x2 data)
{
data.a = data.a+data.a;
data.b = data.b+data.b;
return data;
}
----- cut -----
Right now we do (for spu-elf, it is a similar issue for PPC):
_Z5test211VecFloat4x2:
hbr .L5,$lr
stqd $sp,-128($sp)
ai $sp,$sp,-128
stqd $3,64($sp)
stqd $4,80($sp)
lqd $5,80($sp)
lqd $4,64($sp)
fa $2,$5,$5
fa $3,$4,$4
stqd $2,48($sp)
stqd $3,32($sp)
lqd $4,48($sp)
lqd $3,32($sp)
ai $sp,$sp,128
.L5:
bi $lr
---- cut ----
With the patch which I will attach, we get:
_Z5test211VecFloat4x2:
fa $2,$3,$3
hbr .L5,$lr
stqd $sp,-128($sp)
ai $sp,$sp,-128
nop 127
stqd $3,64($sp)
fa $3,$4,$4
stqd $4,80($sp)
nop 127
stqd $2,32($sp)
ori $4,$3,0
stqd $3,48($sp)
ori $3,$2,0
ai $sp,$sp,128
.L5:
bi $lr
----------- cut ------
Notice how the loads are gone.
Note dse could do the same.
--
Summary: postreload can handle the case where the memory
locations use different modes
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33790
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/33790] postreload can handle the case where the memory locations use different modes
2007-10-16 1:36 [Bug rtl-optimization/33790] New: postreload can handle the case where the memory locations use different modes pinskia at gcc dot gnu dot org
@ 2007-10-16 1:37 ` pinskia at gcc dot gnu dot org
2007-10-16 1:39 ` pinskia 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 @ 2007-10-16 1:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-10-16 01:37 -------
Mine.
--
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 |2007-10-16 01:37:37
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33790
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/33790] postreload can handle the case where the memory locations use different modes
2007-10-16 1:36 [Bug rtl-optimization/33790] New: postreload can handle the case where the memory locations use different modes pinskia at gcc dot gnu dot org
2007-10-16 1:37 ` [Bug rtl-optimization/33790] " pinskia at gcc dot gnu dot org
@ 2007-10-16 1:39 ` pinskia at gcc dot gnu dot org
2008-03-29 8:56 ` pinskia at gcc dot gnu dot org
2008-03-29 9:03 ` pinskia at gmail dot com
3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-10-16 1:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-10-16 01:39 -------
Created an attachment (id=14357)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14357&action=view)
Patch
This patch has been tested on powerpc64-linux-gnu with no regressions and also
test for spu-elf with no regressions. I have not looked into the code size
differences though but it should just decrease them instead of increase them as
we change a load to a move which then maybe register rename can rename
registers around to get one less register usage.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33790
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/33790] postreload can handle the case where the memory locations use different modes
2007-10-16 1:36 [Bug rtl-optimization/33790] New: postreload can handle the case where the memory locations use different modes pinskia at gcc dot gnu dot org
2007-10-16 1:37 ` [Bug rtl-optimization/33790] " pinskia at gcc dot gnu dot org
2007-10-16 1:39 ` pinskia at gcc dot gnu dot org
@ 2008-03-29 8:56 ` pinskia at gcc dot gnu dot org
2008-03-29 9:02 ` Andrew Pinski
2008-03-29 9:03 ` pinskia at gmail dot com
3 siblings, 1 reply; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-03-29 8:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2008-03-29 08:55 -------
Hmm, I wonder how important this is now after the DSE patch for PR 33927 which
basically does the same thing and it also runs after reload. I really don't
want to make cselib any slower than it is already and post reload cse is really
to me a hack for reload (or really RA) not doing its job so I don't want to
slow down post reload cse.
I am going to close this as won't fix as the reasons mentioned about.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33790
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bug rtl-optimization/33790] postreload can handle the case where the memory locations use different modes
2008-03-29 8:56 ` pinskia at gcc dot gnu dot org
@ 2008-03-29 9:02 ` Andrew Pinski
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Pinski @ 2008-03-29 9:02 UTC (permalink / raw)
To: gcc-bugzilla; +Cc: gcc-bugs
I forgot to mention that the dse patch fixes the problem earlier on so
we now do the optimization pre-reload. We still have an extra store
but that is recorded as another bug I filed.
Sent from my iPhone
On Mar 29, 2008, at 1:55, "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org
> wrote:
>
>
> ------- Comment #3 from pinskia at gcc dot gnu dot org 2008-03-29
> 08:55 -------
> Hmm, I wonder how important this is now after the DSE patch for PR
> 33927 which
> basically does the same thing and it also runs after reload. I
> really don't
> want to make cselib any slower than it is already and post reload
> cse is really
> to me a hack for reload (or really RA) not doing its job so I don't
> want to
> slow down post reload cse.
>
> I am going to close this as won't fix as the reasons mentioned about.
>
>
> --
>
> pinskia at gcc dot gnu dot org changed:
>
> What |Removed |Added
> ---
> ---
> ----------------------------------------------------------------------
> Status|ASSIGNED |RESOLVED
> Resolution| |WONTFIX
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33790
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug rtl-optimization/33790] postreload can handle the case where the memory locations use different modes
2007-10-16 1:36 [Bug rtl-optimization/33790] New: postreload can handle the case where the memory locations use different modes pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-03-29 8:56 ` pinskia at gcc dot gnu dot org
@ 2008-03-29 9:03 ` pinskia at gmail dot com
3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gmail dot com @ 2008-03-29 9:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gmail dot com 2008-03-29 09:02 -------
Subject: Re: postreload can handle the case where the memory locations use
different modes
I forgot to mention that the dse patch fixes the problem earlier on so
we now do the optimization pre-reload. We still have an extra store
but that is recorded as another bug I filed.
Sent from my iPhone
On Mar 29, 2008, at 1:55, "pinskia at gcc dot gnu dot org"
<gcc-bugzilla@gcc.gnu.org
> wrote:
>
>
> ------- Comment #3 from pinskia at gcc dot gnu dot org 2008-03-29
> 08:55 -------
> Hmm, I wonder how important this is now after the DSE patch for PR
> 33927 which
> basically does the same thing and it also runs after reload. I
> really don't
> want to make cselib any slower than it is already and post reload
> cse is really
> to me a hack for reload (or really RA) not doing its job so I don't
> want to
> slow down post reload cse.
>
> I am going to close this as won't fix as the reasons mentioned about.
>
>
> --
>
> pinskia at gcc dot gnu dot org changed:
>
> What |Removed |Added
> ---
> ---
> ----------------------------------------------------------------------
> Status|ASSIGNED |RESOLVED
> Resolution| |WONTFIX
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33790
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33790
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-03-29 9:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-16 1:36 [Bug rtl-optimization/33790] New: postreload can handle the case where the memory locations use different modes pinskia at gcc dot gnu dot org
2007-10-16 1:37 ` [Bug rtl-optimization/33790] " pinskia at gcc dot gnu dot org
2007-10-16 1:39 ` pinskia at gcc dot gnu dot org
2008-03-29 8:56 ` pinskia at gcc dot gnu dot org
2008-03-29 9:02 ` Andrew Pinski
2008-03-29 9:03 ` pinskia at gmail dot com
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).