|-------* gcc.target/powerpc/fold-vec-splat-16.c: New |-------* gcc.target/powerpc/fold-vec-splat-32.c: New.

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

[testsuite]
|-------* gcc.target/powerpc/fold-vec-splat-16.c: New
|-------* gcc.target/powerpc/fold-vec-splat-32.c: New.
|-------* gcc.target/powerpc/fold-vec-splat-8.c: New.

From-SVN: r253591
This commit is contained in:
Will Schmidt 2017-10-10 16:32:54 +00:00 committed by Will Schmidt
parent 0ec8f0c6d6
commit 53befce7f2
4 changed files with 144 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2017-10-10 Will Schmidt <will_schmidt@vnet.ibm.com>
* gcc.target/powerpc/fold-vec-splat-16.c: New
* gcc.target/powerpc/fold-vec-splat-32.c: New.
* gcc.target/powerpc/fold-vec-splat-8.c: New.
2017-10-10 Will Schmidt <will_schmidt@vnet.ibm.com>
* gcc.target/powerpc/fold-vec-splats-char.c: New.

View File

@ -0,0 +1,46 @@
/* Verify that overloaded built-ins for vec_splat with int
inputs produce the right code. */
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-mvsx -O2" } */
#include <altivec.h>
vector signed short
testss_1 ()
{
return vec_splat_s16 (5);
}
vector signed short
testss_2 ()
{
return vec_splat_s16 (-5);
}
vector signed short
testss_3 ()
{
return vec_splat_s16 (15);
}
vector unsigned short
testus_1 ()
{
return vec_splat_u16 (5);
}
vector unsigned short
testus_2 ()
{
return vec_splat_u16 (-5);
}
vector unsigned short
testus_3 ()
{
return vec_splat_u16 (15);
}
/* { dg-final { scan-assembler-times "vspltish" 6 } } */

View File

@ -0,0 +1,46 @@
/* Verify that overloaded built-ins for vec_splat 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 signed int
testsi_1 ()
{
return vec_splat_s32 (5);
}
vector signed int
testsi_2 ()
{
return vec_splat_s32 (-5);
}
vector signed int
testsi_3 ()
{
return vec_splat_s32 (15);
}
vector unsigned int
testui_1 ()
{
return vec_splat_u32 (5);
}
vector unsigned int
testui_2 ()
{
return vec_splat_u32 (-5);
}
vector unsigned int
testui_3 ()
{
return vec_splat_u32 (15);
}
/* { dg-final { scan-assembler-times "vspltisw" 6 } } */

View File

@ -0,0 +1,46 @@
/* Verify that overloaded built-ins for vec_splat 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 signed char
testsc_1 ()
{
return vec_splat_s8 (5);
}
vector signed char
testsc_2 ()
{
return vec_splat_s8 (-5);
}
vector signed char
testsc_3 ()
{
return vec_splat_s8 (15);
}
vector unsigned char
testuc_1 ()
{
return vec_splat_u8 (5);
}
vector unsigned char
testuc_2 ()
{
return vec_splat_u8 (-5);
}
vector unsigned char
testuc_3 ()
{
return vec_splat_u8 (15);
}
/* { dg-final { scan-assembler-times "vspltisb" 6 } } */