This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/57949] [powerpc64] Structure parameter alignment issue with vector extensions
- From: "wschmidt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 23 Jul 2013 17:24:40 +0000
- Subject: [Bug target/57949] [powerpc64] Structure parameter alignment issue with vector extensions
- Auto-submitted: auto-generated
- References: <bug-57949-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57949
--- Comment #4 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
Enabling the code used for MachO/Darwin64 when targeting ABI_AIX/linux produces
much better code:
li 9,144
addis 8,2,.LC1@toc@ha
lvx 0,1,9
ld 10,.LC1@toc@l(8)
addis 8,2,.LC2@toc@ha
ld 9,.LC2@toc@l(8)
ld 8,128(1)
stvx 0,0,9
std 8,0(10)
blr
A properly aligned vector load is used from the parameter save area without a
copy through the local variable area.
David/Peter, two questions:
(1) Would it be reasonable to make this the new default behavior, but add a
target-specific flag (-munaligned-vect-struct-parms or something) to allow
compatibility with the existing behavior? I doubt this comes up often, but it
probably occurs somewhere in an existing library interface.
(2) If we make a change, should it be just for Linux, or should we change code
for AIX as well?