--- Comment #6 from rahul at icerasemi dot com 2009-09-11 10:03 ---
An interesting regression results as a side effect of loop header copying (this
occurs even in vanilla O2). If I modify my original test case to
struct struct_t {
int* data;
};
void testAddr (struct struct_t* sp, int
--- Comment #5 from rguenther at suse dot de 2009-08-13 15:58 ---
Subject: Re: invariant address load inside loop
with -Os.
On Thu, 13 Aug 2009, rahul at icerasemi dot com wrote:
> --- Comment #4 from rahul at icerasemi dot com 2009-08-13 15:46 ---
> Confirmed. Introducing l
--- Comment #4 from rahul at icerasemi dot com 2009-08-13 15:46 ---
Confirmed. Introducing loop header copy for Os, resolves the problem.
On our port, this not only helps move the invariant load outside the loop, but
also correctly uses an auto-increment address mode via the AutoInc patc
--- Comment #3 from rguenth at gcc dot gnu dot org 2009-08-11 08:35 ---
Well, the issue is that even LIM doesn't move the load because loop header
copying is not run at -Os which usually makes loop analysis hard.
At -O2 -fno-tree-pre it works, but at -Os it doesn't.
We should be better
--- Comment #2 from steven at gcc dot gnu dot org 2009-08-10 21:29 ---
Hmm, this isn't my day. Of course you're right, Andrew.
So the issue is that a loop invariant load is not hoisted at -Os, because it
does not improve size.
FWIW several patches have been proposed to change this, se
--- Comment #1 from pinskia at gcc dot gnu dot org 2009-08-10 21:15 ---
This is not an aliasing issue rather PRE not running at -Os which is expected.
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
--