summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vmx/7d-01.c
blob: dac5151add111fc6c8c65685dd48e56cbf1fda70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
#include <altivec.h>
extern vector unsigned char a[];

vector unsigned char
f(vector unsigned char *p, int i, int b)
{
  if (b)
    return p[i];
  return vec_ld(i*16,p);
}

vector unsigned char
g(int i, int b)
{
  if (b)
    return a[i];
  return vec_ld(i*16,a);
}