|-------* 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:
parent
0ec8f0c6d6
commit
53befce7f2
@ -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.
|
||||
|
46
gcc/testsuite/gcc.target/powerpc/fold-vec-splat-16.c
Normal file
46
gcc/testsuite/gcc.target/powerpc/fold-vec-splat-16.c
Normal 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 } } */
|
46
gcc/testsuite/gcc.target/powerpc/fold-vec-splat-32.c
Normal file
46
gcc/testsuite/gcc.target/powerpc/fold-vec-splat-32.c
Normal 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 } } */
|
46
gcc/testsuite/gcc.target/powerpc/fold-vec-splat-8.c
Normal file
46
gcc/testsuite/gcc.target/powerpc/fold-vec-splat-8.c
Normal 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 } } */
|
Loading…
x
Reference in New Issue
Block a user