non-pointer arguments to kernels broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pocl |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Passing non-pointer arguments to kernels cause an error in the LLVM optimization passes.
(I've added a 'float c' parameter to the trig example - diff attached for your convenience)
pocl/examples/trig$ ./trig
Wrong type for attribute noalias
void (<4 x float>*, <4 x float>*, float, { i32, [3 x i32], [3 x i32], [3 x i32] }*)* @_trig
Broken module found, compilation aborted!
0 opt 0x08598008
Stack dump:
0. Program arguments: /opt/llvm/
1. Running pass 'Function Pass Manager' on module '.clekKUr4vb/
2. Running pass 'Module Verifier' on function '@_trig'
Aborted
This seems to come from the 'trig' kernel function being compiled to LLVM IR
define void @_trig(<4 x float>* noalias, <4 x float>* noalias, float noalias, ...
by the looks of it, in the "Workgroup creation pass".
I.e. also non-pointers get a 'noalias' attribute, which doesn't make sense (and LLVM doesn't drop it silently)
Related branches
Changed in pocl: | |
status: | New → Fix Released |