blob: 6885b8ce23f8e8ae8da73bb24a7332422b4b8b22 [file] [log] [blame]
/* { dg-skip-if "" { powerpc*-*-darwin* } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mvsx" } */
#include "harness.h"
static int vec_long_long_eq (vector long long x, vector long long y)
{
return (x[0] == y[0] && x[1] == y[1]);
}
static int vec_dbl_eq (vector double x, vector double y)
{
return (x[0] == y[0] && x[1] == y[1]);
}
static void test()
{
vector long long vl = {0, 1};
vector double vd = {0.0, 1.0};
vector long long vlr = vec_insert (2, vl, 0);
vector double vdr = vec_insert (2.0, vd, 1);
vector long long vler = {2, 1};
vector double vder = {0.0, 2.0};
check (vec_long_long_eq (vlr, vler), "vl");
check (vec_dbl_eq (vdr, vder), "vd");
}