public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/32826] New: Reduction into a global variable causes a Load Hit Store Hazard (for the Cell)
@ 2007-07-19 17:14 pinskia at gcc dot gnu dot org
2007-07-19 17:15 ` [Bug tree-optimization/32826] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-07-19 17:14 UTC (permalink / raw)
To: gcc-bugs
Testcase (compile at -O2 -maltivec -ftree-vectorize):
int a[16*100];
int e;
float f(void)
{
int i;
int e1;
e1 = e;
for(i = 0;i<16*100;i++)
e1 += a[i];
e = e1;
}
----------- cut ------
Currently you get:
stvewx v1,0,r2
lis r2,ha16(_e)
lwz r0,-20(r1) <---- LHS hazard
stw r0,lo16(_e)(r2)
Even though the elements of v1 will all be the same, so GCC could do:
lis r2,ha16(_e)
add r2, lo16(_e)(r2)
stvewx v1,0,r2
--
Summary: Reduction into a global variable causes a Load Hit Store
Hazard (for the Cell)
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc*-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32826
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/32826] Reduction into a global variable causes a Load Hit Store Hazard (for the Cell)
2007-07-19 17:14 [Bug tree-optimization/32826] New: Reduction into a global variable causes a Load Hit Store Hazard (for the Cell) pinskia at gcc dot gnu dot org
@ 2007-07-19 17:15 ` pinskia at gcc dot gnu dot org
2007-07-26 10:46 ` tehila at il dot ibm dot com
2007-07-26 17:02 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-07-19 17:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-07-19 17:15 -------
Note I copied the wrong testcase, the correct testcase is:
int a[16*100];
int e;
float f(void)
{
int i;
int e1;
e1 = 0;
for(i = 0;i<16*100;i++)
e1 += a[i];
e = e1;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32826
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/32826] Reduction into a global variable causes a Load Hit Store Hazard (for the Cell)
2007-07-19 17:14 [Bug tree-optimization/32826] New: Reduction into a global variable causes a Load Hit Store Hazard (for the Cell) pinskia at gcc dot gnu dot org
2007-07-19 17:15 ` [Bug tree-optimization/32826] " pinskia at gcc dot gnu dot org
@ 2007-07-26 10:46 ` tehila at il dot ibm dot com
2007-07-26 17:02 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: tehila at il dot ibm dot com @ 2007-07-26 10:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tehila at il dot ibm dot com 2007-07-26 10:46 -------
(In reply to comment #2)
Just want a clarification:
I see you're compiling on PPU (since you're using -maltivec).
Does this problematic also on SPU? Does SPU has this LHS hazard?
Another question:
lwz r0,-20(r1) <---- LHS hazard
stw r0,lo16(_e)(r2)
The problem here is these 2 insns, right?
The store that is right after (or too close to) the load ?
--
tehila at il dot ibm dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tehila at il dot ibm dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32826
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/32826] Reduction into a global variable causes a Load Hit Store Hazard (for the Cell)
2007-07-19 17:14 [Bug tree-optimization/32826] New: Reduction into a global variable causes a Load Hit Store Hazard (for the Cell) pinskia at gcc dot gnu dot org
2007-07-19 17:15 ` [Bug tree-optimization/32826] " pinskia at gcc dot gnu dot org
2007-07-26 10:46 ` tehila at il dot ibm dot com
@ 2007-07-26 17:02 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-07-26 17:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2007-07-26 17:02 -------
(In reply to comment #2)
> (In reply to comment #2)
> Just want a clarification:
> I see you're compiling on PPU (since you're using -maltivec).
> Does this problematic also on SPU?
No because extraction from a vector is a simple rotate.
> Does SPU has this LHS hazard?
No because there is no store queue on the SPU.
>
> Another question:
> lwz r0,-20(r1) <---- LHS hazard
> stw r0,lo16(_e)(r2)
>
> The problem here is these 2 insns, right?
No, it is the load after the store to the same address:
stvewx v1,0,r2
lwz r0,-20(r1) <---- LHS hazard
r2 at this point is equal to -20(r1).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32826
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-26 17:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-19 17:14 [Bug tree-optimization/32826] New: Reduction into a global variable causes a Load Hit Store Hazard (for the Cell) pinskia at gcc dot gnu dot org
2007-07-19 17:15 ` [Bug tree-optimization/32826] " pinskia at gcc dot gnu dot org
2007-07-26 10:46 ` tehila at il dot ibm dot com
2007-07-26 17:02 ` 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).