This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, rs6000] Fix PR61542 - V4SF vector extract for little endian


Hi,

As described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61542, a
new test case (gcc.dg/vect/vect-nop-move.c) was added in 4.9.  This
exposes a bug on PowerPC little endian for extracting an element from a
V4SF value that goes back to 4.8.  The following patch fixes the
problem.

Tested on powerpc64le-unknown-linux-gnu with no regressions.  Ok to
commit to trunk?  I would also like to commit to 4.8 and 4.9 as soon as
possible to be picked up by the distros.

I would also like to backport gcc.dg/vect/vect-nop-move.c to 4.8 to
provide regression coverage.

Thanks,
Bill


2014-06-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/vsx.md (vsx_extract_v4sf): Fix bug with element
	extraction other than index 3.


Index: gcc/config/rs6000/vsx.md
===================================================================
--- gcc/config/rs6000/vsx.md	(revision 211741)
+++ gcc/config/rs6000/vsx.md	(working copy)
@@ -1667,7 +1667,7 @@
     {
       if (GET_CODE (op3) == SCRATCH)
 	op3 = gen_reg_rtx (V4SFmode);
-      emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, op2));
+      emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, GEN_INT (ele)));
       tmp = op3;
     }
   emit_insn (gen_vsx_xscvspdp_scalar2 (op0, tmp));



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]