[cfe-dev] LLVM NVPTX Register class copy
Andrew Hankins via cfe-dev
cfe-dev at lists.llvm.org
Fri Feb 17 02:39:50 PST 2017
Hi all,
Trying to compile a simple "device" function using llvm (3.7) and the ptx
backend and I'm running into the following error.
"LLVM ERROR: Attempted to created cross-class register copy"
I've done some googling and can see a number of patches and discussions
about this topic but I'm still not sure if I'm running into a legitimate
error on my behalf or a bug.
The IR I'm trying to compile is
struct Point
{
double val;
};
define void @StabilizeFunc(%struct.Point*, %struct.Point*) {
StabilizeBlock:
%2 = getelementptr %struct.Point, %struct.Point* %1, i32 0, i32 0
store double 2.000000e+00, double* %2
ret void
}
I plan to JIT device functions like this and link them into a kernel
function which I am writing by hand.
I've tried specifying a number of different address spaces for the pointers
all with no luck. If I change the store to target a global variable in
address space 5 (local) I get the function to successfully generate the PTX
code.
I'd like to stick with version 3.7 and I'm willing to work around any
issues.
Thanks in advanced,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170217/354ba262/attachment.html>
More information about the cfe-dev
mailing list