Tanya Lattner | b92ae0e | 2011-04-15 22:42:59 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -emit-llvm -o %t |
| 2 | |
Tanya Lattner | b6385e8 | 2011-04-16 01:00:29 +0000 | [diff] [blame^] | 3 | typedef __attribute__((ext_vector_type(4))) unsigned char uchar4; |
| 4 | typedef __attribute__((ext_vector_type(4))) unsigned int int4; |
| 5 | typedef __attribute__((ext_vector_type(8))) unsigned char uchar8; |
Tanya Lattner | b92ae0e | 2011-04-15 22:42:59 +0000 | [diff] [blame] | 6 | |
| 7 | // OpenCL allows vectors to be initialized by vectors Handle bug in |
| 8 | // VisitInitListExpr for this case below. |
Tanya Lattner | b6385e8 | 2011-04-16 01:00:29 +0000 | [diff] [blame^] | 9 | void foo( int4 v ) |
Tanya Lattner | b92ae0e | 2011-04-15 22:42:59 +0000 | [diff] [blame] | 10 | { |
Tanya Lattner | b6385e8 | 2011-04-16 01:00:29 +0000 | [diff] [blame^] | 11 | uchar4 val[4] = {{(uchar4){((uchar8)(v.lo)).lo}}}; |
Tanya Lattner | b92ae0e | 2011-04-15 22:42:59 +0000 | [diff] [blame] | 12 | } |