GPGPU: use current 'Index' to find slot in parameter array
authorTobias Grosser <tobias@grosser.es>
Thu, 28 Jul 2016 06:47:53 +0000 (06:47 +0000)
committerTobias Grosser <tobias@grosser.es>
Thu, 28 Jul 2016 06:47:53 +0000 (06:47 +0000)
commit44143bb927ce58beabd92adbd4115364a4c093c4
tree70b77ae97d357683740145b6cb8022e1e91e88ab
parent4e18d71c71788654dd5c3e3b151ada8666b91029
GPGPU: use current 'Index' to find slot in parameter array

Before this change we used the array index, which would result in us accessing
the parameter array out-of-bounds. This bug was visible for test cases where not
all arrays in a scop are passed to a given kernel.

llvm-svn: 276961
polly/lib/CodeGen/PPCGCodeGeneration.cpp
polly/test/GPGPU/kernel-params-only-some-arrays.ll