KhronosGroup/SPIRV-LLVM

llvm-spirv tool crashes during conversion of enqueue_kernel function call

Closed this issue · 1 comments

Current implementation assumes that last argument of the enqueue_kernel call is bitcast from llvm block type to void()*.
This assumption is not always true;

To reproduce run llvm-as < extExecution.ll.txt | llvm-spir

extExecution.ll.txt
extExecution.cl.txt

This test is invalid. According to OCL 2.0 spec rev 31:

Block variable declarations must be qualified with const. Therefore all block variables must be initialized at declaration time and may not be reassigned.