This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH], PowerPC PR 61431, Fix little endian word swapping for 128-bit types
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 6 Jun 2014 19:04:33 -0400
- Subject: Re: [PATCH], PowerPC PR 61431, Fix little endian word swapping for 128-bit types
- Authentication-results: sourceware.org; auth=none
- References: <20140606190217 dot GA8602 at ibm-tiger dot the-meissners dot org>
On Fri, Jun 6, 2014 at 3:02 PM, Michael Meissner
> The pack01.c test fails on GCC 4.8 on little endian power8 systems. In looking
> at it, it is a bug where the V1TI memory operations do not have the word
> swapping define_split support. GCC 4.9 and trunk can optimize the union to
> stay in a register, so the test case passes on those systems, but it is still a
> bug that would be exposed if you ever need to store vector __int128 values.
> The test p8vector-int128-2.c is such a case, and it needs the fix.
> I've tested this via bootstrap and make check on power8 big and little endian
> systems, and there were no regressions. The test p8vector-int128-2.c now
> passes on the little endian power8 with this fix.
> Are these patches ok to check into the trunk, and 4.9/4.8 branches?
> 2014-06-06 Michael Meissner <firstname.lastname@example.org>
> PR target/61431
> * config/rs6000/vsx.md (VSX_LE): Split VSX_D into 2 separate
> iterators, VSX_D that handles 64-bit types, and VSX_LE that
> handles swapping the two 64-bit double words on little endian
> systems. Include V1TImode and optionally TImode in VSX_LE so that
> these types are properly swapped. Change all of the insns and
> splits that do the 64-bit swaps to use VSX_LE.
> (vsx_le_perm_load_<mode>): Likewise.
> (vsx_le_perm_store_<mode>): Likewise.
> (splitters for little endian memory operations): Likewise.
> (vsx_xxpermdi2_le_<mode>): Likewise.
> (vsx_lxvd2x2_le_<mode>): Likewise.
> (vsx_stxvd2x2_le_<mode>): Likewise.