Clang command for OpenCL

Dear all,

I am trying to use a command like the following one to convert an OpenCL file into a bytecode:

clang -x cl -cl-std=CL2.0 -emit-llvm -target spir64 -Xclang -finclude-default-header -cl-single-precision-constant -o INPUT.bc

This command gives me a .llc file as output instead of a .bc. Which is the error? I cannot use the flag “-emit-llvm-bc” without using the frontend.

I attach the compilation link:

Hi Enrique,

The command line below should emit a bitcode file:

clang -cc1 -cl-std=CL2.0 -finclude-default-header -emit-llvm-bc -triple spir64 -cl-single-precision-constant -o INPUT.bc

Let me know if you have any other issues.