<div dir="ltr"><div><div>Hi,<br><br></div>I downloaded LLVM 3.3 with clang support from <a href="http://llvm.org/releases/download.html#3.3" target="_blank">http://llvm.org/releases/download.html#3.3</a>, and installed it on my machine. I also installed the opencl header files.<br>
<br></div><div>I'm attempting to compile a simple program as follows:<br>#pragma OPENCL EXTENSION cl_khr_fp64 : enable<br>#include <CL/cl.h><br>/* Test kernel */<br>__kernel void test(__global float *in, __global float *out) {<br>
int index = get_global_id(0);<br> out[index] = 3.14159f * in[index] + in[index];<br>}<br><br></div><div>I'm compiling it with: clang -I/usr/include/CL -std=CL1.2 -x cl <a href="http://test.cl" target="_blank">test.cl</a> -o test.ll<br>
<br></div><div>but I get the following error:<br></div><div>OpenCL/build/Release+Asserts/bin/../lib/clang/3.3/include/emmintrin.h:1355:48: error: <br> too few elements in vector initialization (expected 2<br> elements, have 1)<br>
return __builtin_shufflevector(__a, (__m128i){ 0 }, 0, 2);<br><br></div><div>I'm uncertain how to fix it. The error is coming from clang header files. The file is parsed correctly in C.<br><br></div><div>My goal is to compile a opencl program with clang with LLVM to get the SPIR. The target processor is a microblaze (mblaze).<br>
<br> </div>Any help would be appreciated to solve this issue. Thanks,<br clear="all"><br>-- <br><div>Vincent Mirian</div><div>PhD Candidate</div><div>Electrical and Computer Engineering</div><div>University of Toronto</div>
<div><br></div><div><font color="#009900">Eco-Tip: Save trees! Do you really need to print this email? ;-)</font></div>
</div>