Quantcast

LLVM NVPTX Register class copy

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

LLVM NVPTX Register class copy

Ammarguellat, Zahira via cfe-dev
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



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...