Commit 7ca83c36 by Will Schmidt Committed by Will Schmidt

fold-vec-unpack-char.c: New.


[testsuite]

2018-07-06  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc.target/powerpc/fold-vec-unpack-char.c: New.
	* gcc.target/powerpc/fold-vec-unpack-float.c: New.
	* gcc.target/powerpc/fold-vec-unpack-int.c: New.
	* gcc.target/powerpc/fold-vec-unpack-pixel.c: New.
	* gcc.target/powerpc/fold-vec-unpack-short.c: New.

From-SVN: r262827
parent c2eab53d
2018-07-17 Will Schmidt <will_schmidt@vnet.ibm.com>
* gcc.target/powerpc/fold-vec-unpack-char.c: New.
* gcc.target/powerpc/fold-vec-unpack-float.c: New.
* gcc.target/powerpc/fold-vec-unpack-int.c: New.
* gcc.target/powerpc/fold-vec-unpack-pixel.c: New.
* gcc.target/powerpc/fold-vec-unpack-short.c: New.
2018-07-17 David Edelsohn <dje.gcc@gmail.com>
* gcc.target/powerpc/pr57150.c: Require longdouble128.
......
/* Verify that overloaded built-ins for vec_unpackh and vec_unpackl with char
inputs produce the right code. */
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec -O2" } */
#include <altivec.h>
vector bool short
testbc_l (vector bool char vbc2)
{
return vec_unpackl (vbc2);
}
vector signed short
testsc_l (vector signed char vsc2)
{
return vec_unpackl (vsc2);
}
vector bool short
testbc_h (vector bool char vbc2)
{
return vec_unpackh (vbc2);
}
vector signed short
testsc_h (vector signed char vsc2)
{
return vec_unpackh (vsc2);
}
/* { dg-final { scan-assembler-times "vupkhsb" 2 } } */
/* { dg-final { scan-assembler-times "vupklsb" 2 } } */
/* Verify that overloaded built-ins for vec_unpackh and vec_unpackl with float
inputs produce the right code. */
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-mpower8-vector -O2" } */
#include <altivec.h>
vector double
testf_l (vector float vf2)
{
return vec_unpackl (vf2);
}
vector double
testf_h (vector float vf2)
{
return vec_unpackh (vf2);
}
/* { dg-final { scan-assembler-times "xxsldwi" 4 } } */
/* { dg-final { scan-assembler-times "xvcvspdp" 2 } } */
/* Verify that overloaded built-ins for vec_unpackh and vec_unpackl with int
inputs produce the right code. */
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-mpower8-vector -O2" } */
#include <altivec.h>
vector bool long long
testbi_l (vector bool int vbi2)
{
return vec_unpackl (vbi2);
}
vector signed long long
testsi_l (vector signed int vsi2)
{
return vec_unpackl (vsi2);
}
vector bool long long
testbi_h (vector bool int vbi2)
{
return vec_unpackh (vbi2);
}
vector signed long long
testsi_h (vector signed int vsi2)
{
return vec_unpackh (vsi2);
}
/* { dg-final { scan-assembler-times "vupkhsw" 2 } } */
/* { dg-final { scan-assembler-times "vupklsw" 2 } } */
/* Verify that overloaded built-ins for vec_unpackh and vec_unpackl with pixel
inputs produce the right code. */
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec -O2" } */
#include <altivec.h>
vector unsigned int
testf_el (vector pixel vpx2)
{
return vec_unpackl (vpx2);
}
vector unsigned int
testf_eh (vector pixel vpx2)
{
return vec_unpackh (vpx2);
}
/* { dg-final { scan-assembler-times "vupkhpx" 1 } } */
/* { dg-final { scan-assembler-times "vupklpx" 1 } } */
/* Verify that overloaded built-ins for vec_unpackh and vec_unpackl with int
inputs produce the right code. */
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec -O2" } */
#include <altivec.h>
vector bool int
testbi_el (vector bool short vbs2)
{
return vec_unpackl (vbs2);
}
vector signed int
testsi_el (vector signed short vss2)
{
return vec_unpackl (vss2);
}
vector bool int
testbi_eh (vector bool short vbs2)
{
return vec_unpackh (vbs2);
}
vector signed int
testsi_eh (vector signed short vss2)
{
return vec_unpackh (vss2);
}
/* { dg-final { scan-assembler-times "vupkhsh" 2 } } */
/* { dg-final { scan-assembler-times "vupklsh" 2 } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment