This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/51017] GCC 4.6 performance regression (vs. 4.4/4.5), PRE increases register pressure
- From: "solar-gcc at openwall dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 18 Feb 2015 03:19:52 +0000
- Subject: [Bug tree-optimization/51017] GCC 4.6 performance regression (vs. 4.4/4.5), PRE increases register pressure
- Auto-submitted: auto-generated
- References: <bug-51017-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51017
--- Comment #19 from Alexander Peslyak <solar-gcc at openwall dot com> ---
(In reply to Alexander Peslyak from comment #17)
> Should we create a new bug for the unnecessary and non-optional use of
> unaligned load instructions for source code like this, or is this considered
> the new intended behavior despite of the major slowdown on such CPUs?
> (Presumably not only for JtR. I'd expect this to affect many programs.)
Upon further analysis, I now think that this was my fault, and (presumably) not
common in other programs. What I had was differing definition vs. declaration,
so a bug. The lack of alignment specification in the declaration of the struct
essentially told (newer) GCC not to assume alignment - to an extent greater
than e.g. a pointer would. As far as I can tell, GCC does not currently
produce unaligned load instructions (so assumes that SSE* vectors are properly
aligned) when all it has is a pointer coming from another object file. I think
that's the common scenario, whereas mine was uncommon (and incorrect).
So let's focus on PRE only.