builtins-1-p9-runnable.c: Forgot to add new file before doing commit 250051.
gcc/testsuite/ChangeLog: 2017-07-07 Carl Love <cel@us.ibm.com> * gcc.target/powerpc/builtins-1-p9-runnable.c: Forgot to add new file before doing commit 250051. From-SVN: r250052
This commit is contained in:
parent
19388c6d5b
commit
13bd548e16
26
gcc/testsuite/gcc.target/powerpc/builtins-1-p9-runnable.c
Normal file
26
gcc/testsuite/gcc.target/powerpc/builtins-1-p9-runnable.c
Normal file
@ -0,0 +1,26 @@
|
||||
/* { dg-do run { target { powerpc*-*-linux* } } } */
|
||||
/* { dg-require-effective-target powerpc_p9vector_ok } */
|
||||
/* { dg-options "-O2 -mcpu=power9" } */
|
||||
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
|
||||
|
||||
#include <altivec.h>
|
||||
|
||||
void abort (void);
|
||||
|
||||
int main() {
|
||||
int i;
|
||||
vector float vfa, vfb;
|
||||
vector unsigned short vur, vuexpt;
|
||||
|
||||
vfa = (vector float){3.4, 5.0, 20.0, 50.9 };
|
||||
vfb = (vector float){10.0, 40.0, 70.0, 100.0 };
|
||||
vuexpt = (vector unsigned short){ 3, 5, 20, 50,
|
||||
10, 40, 70, 100};
|
||||
|
||||
vur = vec_pack_to_short_fp32 (vfa, vfb);
|
||||
|
||||
for(i = 0; i< 8; i++) {
|
||||
if (vur[i] != vuexpt[i])
|
||||
abort();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user