GPGPU: use current 'Index' to find slot in parameter array
commit3ff35b793569c05b13819bbbd0754aeef482c6d6
authorTobias Grosser <tobias@grosser.es>
Thu, 28 Jul 2016 06:47:53 +0000 (28 06:47 +0000)
committerTobias Grosser <tobias@grosser.es>
Thu, 28 Jul 2016 06:47:53 +0000 (28 06:47 +0000)
tree4f8a961fd8284de73976134a01968d1b186e757e
parent8402aa7bd1346b8353b3e011b5fe9afbd41d9fc1
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.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@276961 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/PPCGCodeGeneration.cpp
test/GPGPU/kernel-params-only-some-arrays.ll