non-pointer arguments to kernels broken

Bug #910932 reported by Kalle Raiskila
6
This bug affects 1 person
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/3.0rc4/bin//opt -load=/home/kraiskil/pocl/lib/llvmopencl/.libs/llvmopencl.so -generate-header -loop-simplify -loop-barriers -barriertails -barriers -flatten -always-inline -workitem -workgroup -kernel=trig -local-size=2 1 1 -header=.clekKUr4vb/kernel_header.h -o .clekKUr4vb/parallel.bc .clekKUr4vb/kernel_linked.bc
1. Running pass 'Function Pass Manager' on module '.clekKUr4vb/kernel_linked.bc'.
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

Revision history for this message
Kalle Raiskila (kraiskil) wrote :
Changed in pocl:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.