ispc/ispc — Issue #181: Writing to a pointer parameter causes an LLVM assertion
Author: unrstuart
Created: 2012-02-22 21:42:04+00:00
State: open

jstuart@dreamgirl:/usr/home/jstuart {964} > cat dotproduct.ispc
export void dotProduct(uniform const float * a,
uniform const float * b,
uniform float * c,
uniform const int numElements)
{
float sum = 0.0f;
foreach (i = 0 ... numElements)
{
sum += a[i] * b[i];
}
c[programIndex + 1] = sum;
c[0] = (float)programCount;
}
jstuart@dreamgirl:/usr/home/jstuart {965} > ispc --target=sse2,sse4-x2,avx-x2 -O2 dotproduct.ispc -o dotproduct_ispc.o
ispc: Instructions.cpp:1079: void llvm::StoreInst::AssertOK(): Assertion `getOperand(1)->getType()->isPointerTy() && "Ptr must have pointer type!"' failed.
Abort
jstuart@dreamgirl:/usr/home/jstuart {966} >