Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion `isRegLoc()' when using long in OpenCL kernels #179

Open
nrother opened this issue Oct 10, 2022 · 1 comment
Open

Assertion `isRegLoc()' when using long in OpenCL kernels #179

nrother opened this issue Oct 10, 2022 · 1 comment

Comments

@nrother
Copy link
Contributor

nrother commented Oct 10, 2022

Compiling the following OpenCL kernel code for a TTA target fails with an assertion:

__kernel void test(long a, __global int *b)
{
    long mul = (a * (long)10);
    int x_in = (int)(mul / (1 << 30));
    *b = x_in;
}
llvm-tce: /path/llvm14/include/llvm/CodeGen/CallingConvLower.h:150: llvm::Register llvm::CCValAssign::getLocReg() const: Assertion `isRegLoc()' failed.

This seems to be related to the usage of long.

@pjaaskel
Copy link
Contributor

Likely due to it since in OpenCL C long is 64b always while in C we can (and do) define it to 32b for 32b TTAs. There's experimental 64b support in TCE which you could try out, but prepare for issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants