Commit 07999eb2 by Will Schmidt Committed by Will Schmidt

fold-vec-cntlz-int.c: New.


	2017-08-09  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc.target/powerpc/fold-vec-cntlz-int.c: New.
	* gcc.target/powerpc/fold-vec-cntlz-char.c: New.
	* gcc.target/powerpc/fold-vec-cntlz-short.c: New.
	* gcc.target/powerpc/fold-vec-cntlz-longlong.c: New.

From-SVN: r250995
parent 9fb82e65
2017-08-09 Will Schmidt <will_schmidt@vnet.ibm.com>
* gcc.target/powerpc/fold-vec-cntlz-int.c: New.
* gcc.target/powerpc/fold-vec-cntlz-char.c: New.
* gcc.target/powerpc/fold-vec-cntlz-short.c: New.
* gcc.target/powerpc/fold-vec-cntlz-longlong.c: New.
2017-08-09 Slava Barinov <v.barinov@samsung.com>
* g++.dg/asan/asan.exp: Switch on *.cc tests.
......
/* Verify that overloaded built-ins for vec_cntlz with char
inputs produce the right results. */
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-maltivec -mpower8-vector -O2" } */
#include <altivec.h>
vector signed char
testsc_h (vector signed char vsc2)
{
return vec_cntlz (vsc2);
}
vector unsigned char
testuc_h (vector unsigned char vuc2)
{
return vec_cntlz (vuc2);
}
/* { dg-final { scan-assembler-times "vclzb" 2 } } */
/* Verify that overloaded built-ins for vec_cntlz with int
inputs produce the right results. */
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-maltivec -mpower8-vector -O2" } */
#include <altivec.h>
vector signed int
testsi (vector signed int vsi2)
{
return vec_cntlz (vsi2);
}
vector unsigned int
testui (vector unsigned int vui2)
{
return vec_cntlz (vui2);
}
/* { dg-final { scan-assembler-times "vclzw" 2 } } */
/* Verify that overloaded built-ins for vec_cntlz with long long
inputs produce the right results. */
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-mvsx -mpower8-vector -O2" } */
#include <altivec.h>
vector signed long long
testsl (vector signed long long vsl2)
{
return vec_cntlz (vsl2);
}
vector unsigned long long
testul (vector unsigned long long vul2)
{
return vec_cntlz (vul2);
}
/* { dg-final { scan-assembler-times "vclzd" 2 } } */
/* Verify that overloaded built-ins for vec_cntlz with int
inputs produce the right results. */
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-maltivec -mpower8-vector -O2" } */
#include <altivec.h>
vector signed short
testsi (vector signed short vss2)
{
return vec_cntlz (vss2);
}
vector unsigned short
testui (vector unsigned short vus2)
{
return vec_cntlz (vus2);
}
/* { dg-final { scan-assembler-times "vclzh" 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