1 /* { dg-do run { target powerpc*-*-* } } */
2 /* { dg-xfail-if "" { "powerpc-*-eabispe*" "powerpc-ibm-aix*" } { "*" } { "" } } */
3 /* { dg-options "-maltivec" } */
5 /* Program to test PowerPC AltiVec instructions. */
8 #include "altivec_check.h"
10 extern void abort (void);
12 vector
int a1
= { 100, 200, 300, 400 };
13 vector
int a2
= { 500, 600, 700, 800 };
14 vector
int addi
= { 600, 800, 1000, 1200 };
15 vector
int avgi
= { 300, 400, 500, 600 };
17 vector
float f1
= { 1.0, 2.0, 3.0, 4.0 };
18 vector
float f2
= { 5.0, 6.0, 7.0, 8.0 };
20 vector
float addf
= { 6.0, 8.0, 10.0, 12.0 };
27 altivec_check(); /* Exits if AltiVec not supported */
30 if (!vec_all_eq (addi
, k
))
34 if (!vec_all_eq (k
, avgi
))
38 if (!vec_all_eq (h
, addf
))