xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/2007-05-03-VectorInit.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm %s -o -
2*f4a2713aSLionel Sambuc // PR1378
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc typedef float v4sf __attribute__((vector_size(16)));
5*f4a2713aSLionel Sambuc 
6*f4a2713aSLionel Sambuc typedef v4sf float4;
7*f4a2713aSLionel Sambuc 
splat4(float a)8*f4a2713aSLionel Sambuc static float4 splat4(float a)
9*f4a2713aSLionel Sambuc {
10*f4a2713aSLionel Sambuc   float4 tmp = {a,a,a,a};
11*f4a2713aSLionel Sambuc   return tmp;
12*f4a2713aSLionel Sambuc }
13*f4a2713aSLionel Sambuc 
foo(float a)14*f4a2713aSLionel Sambuc float4 foo(float a)
15*f4a2713aSLionel Sambuc {
16*f4a2713aSLionel Sambuc   return splat4(a);
17*f4a2713aSLionel Sambuc }
18