+2018-06-11 Carl Love <cel@us.ibm.com>
+ * gcc.target/powerpc/altivec-7.c (main): Remove tests
+ vec_unpackh(vecubi[0]) and vec_unpackl(vecubi[0]) returning
+ long long bool. Remove duplicate dg-final for xxlxor. Update
+ dg-final instruction counts.
+ * gcc.target/powerpc/altivec-37.c (main): New file for
+ tests vec_unpackh and vec_unpackl returning long long bool and
+ long long int.
+
2018-06-11 Martin Liska <mliska@suse.cz>
PR tree-optimization/86089
--- /dev/null
+/* { dg-do compile { target powerpc*-*-* } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mpower8-vector -mvsx" } */
+
+#include <altivec.h>
+
+vector bool int *vecubi;
+vector bool long long *vecublli;
+vector signed int *vecsi;
+vector signed long long int *vecslli;
+
+int main ()
+{
+
+ /* use of ‘long long’ in AltiVec types requires -mvsx */
+ /* __builtin_altivec_vupkhsw and __builtin_altivec_vupklsw
+ requires the -mpower8-vector option */
+ *vecublli++ = vec_unpackh(vecubi[0]);
+ *vecublli++ = vec_unpackl(vecubi[0]);
+ *vecslli++ = vec_unpackh(vecsi[0]);
+ *vecslli++ = vec_unpackl(vecsi[0]);
+
+ return 0;
+}
+
+/* Expected results:
+ vec_unpackh vupklsw
+ vec_unpackl vupkhsw
+*/
+
+/* { dg-final { scan-assembler-times "vupklsw" 2 } } */
+/* { dg-final { scan-assembler-times "vupkhsw" 2 } } */
vector bool int *vecubi;
vector bool char *vecubci;
vector bool short int *vecubsi;
-vector bool long long int *vecublli;
vector unsigned short *vecushort;
vector bool int *vecbint;
vector float *vecfloat;
*vecubi++ = vec_unpackh(vecubsi[0]);
*vecuint++ = vec_unpackh(varpixel[0]);
- *vecublli++ = vec_unpackh(vecubi[0]);
*vecubsi++ = vec_unpackh(vecubci[0]);
*vecshort++ = vec_unpackh(vecchar[0]);
*vecubi++ = vec_unpackl(vecubsi[0]);
*vecuint++ = vec_unpackl(varpixel[0]);
- *vecublli++ = vec_unpackl(vecubi[0]);
*vecubsi++ = vec_unpackl(vecubci[0]);
*vecshort++ = vec_unpackl(vecchar[0]);
vec_lvewx lvewx
vec_unpackh vupklsh
vec_unpackh vupklpx
- vec_unpackh vupklsw
vec_unpackh vupklsb
vec_unpackl vupkhsh
vec_unpackl vupkhpx
- vec_unpackl vupkhsw
vec_unpackl vupkhsb
vec_andc xxnor
xxland
/* { dg-final { scan-assembler-times "vpkpx" 2 } } */
/* { dg-final { scan-assembler-times "vmulesb" 1 } } */
/* { dg-final { scan-assembler-times "vmulosb" 1 } } */
-/* { dg-final { scan-assembler-times {\mlxvd2x\M|\mlxv\M} 44 { target le } } } */
+/* { dg-final { scan-assembler-times {\mlxvd2x\M|\mlxv\M} 42 { target le } } } */
/* { dg-final { scan-assembler-times {\mlxvd2x\M|\mlxv\M} 4 { target be } } } */
/* { dg-final { scan-assembler-times "lvewx" 2 } } */
/* { dg-final { scan-assembler-times "lvxl" 1 } } */
/* { dg-final { scan-assembler-times "xxland" 4 } } */
/* { dg-final { scan-assembler-times "xxlxor" 5 } } */
/* { dg-final { scan-assembler-times "xxlandc" 0 } } */
-/* { dg-final { scan-assembler-times "xxlxor" 5 } } */
/* { dg-final { scan-assembler-times "lvx" 1 } } */
/* { dg-final { scan-assembler-times "vmsumubm" 1 } } */
/* { dg-final { scan-assembler-times "vupklpx" 1 } } */
/* { dg-final { scan-assembler-times "vupklsx" 0 } } */
/* { dg-final { scan-assembler-times "vupklsb" 2 } } */
/* { dg-final { scan-assembler-times "vupkhpx" 1 } } */
-/* { dg-final { scan-assembler-times "vupkhsw" 1 } } */
/* { dg-final { scan-assembler-times "vupkhsb" 2 } } */