blob: 1084f6d20b9b600b16e8d7f36b4d92c6be01ae1c [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -emit-llvm %s -o -
Anders Carlsson79b67f32008-02-01 23:17:55 +00002typedef short __v4hi __attribute__ ((__vector_size__ (8)));
3
4void f()
5{
6 __v4hi A = (__v4hi)0LL;
Anders Carlsson2cec15f2008-02-01 23:27:51 +00007}
Eli Friedmancfb313b2008-05-30 12:02:14 +00008
9__v4hi x = {1,2,3};
10__v4hi y = {1,2,3,4};
Eli Friedmandaa24a22009-03-28 02:45:41 +000011
Eli Friedman3ded2002009-03-28 03:14:28 +000012typedef int vty __attribute((vector_size(16)));
13int a() { vty b; return b[2LL]; }
Eli Friedman61d004a2009-06-06 19:09:26 +000014
15// PR4339
16typedef float vec4 __attribute__((vector_size(16)));
17
18void vac ( vec4* a, char b, float c )
19{
20 (*a)[b] = c;
21}