This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Fix rs6000_expand_vector_set for little endian
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 2 Nov 2013 11:14:47 -0400
- Subject: Re: [PATCH, rs6000] Fix rs6000_expand_vector_set for little endian
- Authentication-results: sourceware.org; auth=none
- References: <1383270347 dot 6275 dot 241 dot camel at gnopaine>
On Thu, Oct 31, 2013 at 9:45 PM, Bill Schmidt
<wschmidt@linux.vnet.ibm.com> wrote:
> Hi,
>
> Brooks Moses reported a bug with code that sets a single element of a
> vector to a given value and the rest of the vector to zero. This is
> implemented in rs6000_expand_vector_set, which uses a vperm instruction
> to place the nonzero value. As usual, we need to adjust the permute
> control vector and swap the order of the input operands. I added a test
> case based on the bug report.
>
> Bootstrapped and tested on powerpc64{,le}-unknown-linux-gnu with no
> regressions. The new test now passes for both endiannesses. Is this ok
> for trunk?
>
> Thanks,
> Bill
>
>
> gcc:
>
> 2013-10-31 Bill Schmidt <wschmidt@vnet.linux.ibm.com>
>
> * config/rs6000/rs6000.c (rs6000_expand_vector_set): Adjust for
> little endian.
This is okay.
> + if (!BYTES_BIG_ENDIAN)
But negating the expression and reversing the branches seems superfluous.
Thanks, David