The compilation fails with ICE:
fatal error: error in backend: Unsupported calling convention
This due to the fact that we add SPIR_KERNEL calling convention by default to all kernels but the targets are expected to override it if they don't handle it.
Extended Description
Compiling any valid OpenCL C source with kernel results in ICE.
Example:
kernel void foo(__global int ptr) { ptr = 1; };
Command line: clang-13 --target=arm-linux-gnueabi test.cl
The compilation fails with ICE: fatal error: error in backend: Unsupported calling convention
This due to the fact that we add SPIR_KERNEL calling convention by default to all kernels but the targets are expected to override it if they don't handle it.