public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, rs6000] Fix V16QI vector splat for little endian
@ 2013-11-20  2:45 Bill Schmidt
  2013-11-20  5:11 ` David Edelsohn
  0 siblings, 1 reply; 2+ messages in thread
From: Bill Schmidt @ 2013-11-20  2:45 UTC (permalink / raw)
  To: gcc-patches; +Cc: dje.gcc

Hi,

When possible, we translate VEC_PERM_EXPRs into vector splat operations.
A previous patch fixed this up for little endian, but there was an
oversight for V16QI mode.  This patch fixes that oversight.  This fixes
the failing test gcc.dg/torture/vshuf-v16qi.c.

Bootstrapped and tested on powerpc64{,le}-unknown-linux-gnu using
--with-cpu=power7 with no regressions.  Is this ok for trunk?

Thanks,
Bill


2013-11-19  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Adjust
	V16QI vector splat case for little endian.


Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 205002)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -29849,6 +29849,8 @@ altivec_expand_vec_perm_const (rtx operands[4])
 	  break;
       if (i == 16)
 	{
+          if (!BYTES_BIG_ENDIAN)
+            elt = 15 - elt;
 	  emit_insn (gen_altivec_vspltb (target, op0, GEN_INT (elt)));
 	  return true;
 	}


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH, rs6000] Fix V16QI vector splat for little endian
  2013-11-20  2:45 [PATCH, rs6000] Fix V16QI vector splat for little endian Bill Schmidt
@ 2013-11-20  5:11 ` David Edelsohn
  0 siblings, 0 replies; 2+ messages in thread
From: David Edelsohn @ 2013-11-20  5:11 UTC (permalink / raw)
  To: Bill Schmidt; +Cc: GCC Patches

On Tue, Nov 19, 2013 at 5:41 PM, Bill Schmidt
<wschmidt@linux.vnet.ibm.com> wrote:
> Hi,
>
> When possible, we translate VEC_PERM_EXPRs into vector splat operations.
> A previous patch fixed this up for little endian, but there was an
> oversight for V16QI mode.  This patch fixes that oversight.  This fixes
> the failing test gcc.dg/torture/vshuf-v16qi.c.
>
> Bootstrapped and tested on powerpc64{,le}-unknown-linux-gnu using
> --with-cpu=power7 with no regressions.  Is this ok for trunk?
>
> Thanks,
> Bill
>
>
> 2013-11-19  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
>
>         * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Adjust
>         V16QI vector splat case for little endian.

Okay.

Thanks, David

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-19 23:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-20  2:45 [PATCH, rs6000] Fix V16QI vector splat for little endian Bill Schmidt
2013-11-20  5:11 ` David Edelsohn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).