summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/altivec.cpp
blob: 921bb73f9eadc313045c32a3603ed25ae64dc245 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// RUN: %clang_cc1 -faltivec -fno-lax-vector-conversions -triple powerpc-unknown-unknown -verify %s

typedef int V4i __attribute__((vector_size(16)));

void f(V4i a)
{
}

void test1()
{
  V4i vGCC;
  vector int vAltiVec;

  f(vAltiVec);
  vGCC = vAltiVec;
  bool res = vGCC > vAltiVec;
  vAltiVec = 0 ? vGCC : vGCC;
}

template<typename T>
void template_f(T param) {
  param++;
}

void test2()
{
  vector int vi;
  ++vi;
  vi++;
  --vi;
  vi--;
  vector float vf;
  vf++;

  ++vi=vi;
  (++vi)[1]=1;
  template_f(vi);
}
OpenPOWER on IntegriCloud