2010-08-06 18:14:59 +08:00
|
|
|
// 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)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2011-02-07 10:17:30 +08:00
|
|
|
void test1()
|
2010-08-06 18:14:59 +08:00
|
|
|
{
|
|
|
|
V4i vGCC;
|
|
|
|
vector int vAltiVec;
|
|
|
|
|
|
|
|
f(vAltiVec);
|
|
|
|
vGCC = vAltiVec;
|
2010-11-18 11:19:30 +08:00
|
|
|
bool res = vGCC > vAltiVec;
|
2010-08-06 18:14:59 +08:00
|
|
|
vAltiVec = 0 ? vGCC : vGCC;
|
|
|
|
}
|
2011-02-07 10:17:30 +08:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|