Hi,

This cleans up another case where a vector-pack operation needs to
reverse its operand order for little endian.  This fixes the last
remaining vector test failure in the test suite when building for little
endian.

Next I'll be spending some time looking for additional little endian
issues for which we don't yet have test coverage.  As an example, there
are several patterns similar to vect_pack_trunc_v2df that probably need
the same treatment as this patch, but we don't have any test cases that
expose a problem.  I need to verify those are broken and add test cases
when fixing them.

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

Thanks,
Bill


2013-11-04  Bill Schmidt  <wschm...@linux.vnet.ibm.com>

        * config/rs6000/vector.md (vec_pack_trunc_v2df):  Adjust for
        little endian.


Index: gcc/config/rs6000/vector.md
===================================================================
--- gcc/config/rs6000/vector.md (revision 204320)
+++ gcc/config/rs6000/vector.md (working copy)
@@ -830,7 +830,12 @@
 
   emit_insn (gen_vsx_xvcvdpsp (r1, operands[1]));
   emit_insn (gen_vsx_xvcvdpsp (r2, operands[2]));
-  rs6000_expand_extract_even (operands[0], r1, r2);
+
+  if (BYTES_BIG_ENDIAN)
+    rs6000_expand_extract_even (operands[0], r1, r2);
+  else
+    rs6000_expand_extract_even (operands[0], r2, r1);
+
   DONE;
 })
 


Reply via email to