Christian Thalinger christian.thalinger at oracle.com
Mon Apr 8 22:01:16 PDT 2013

On Apr 5, 2013, at 11:36 AM, "Venkatachalam, Vasanth" <Vasanth.Venkatachalam at amd.com> wrote:

> Hi,
> I was playing with your testArraySnippet in BasicPTXTest which returns the zero-th element of an array.
> If instead of returning the 0th element, I modify the test case like this to return the ith element:
> public static int testArraySnippet(int[]array, int i) {
> return array[i];
> }
> I get the error below. It looks like the issues is that base register for the address computation in prepareAddress is a null object, so the emitAdd is throwing an exception.
> This seems to be an issue in the PTX test as well as my HSAIL test which is modeled after the PTX test. Are there plans to fix it, or do people have ideas for what needs to be fixed here?

Morris is currently working on extending the PTX backend.  Maybe he knows more about this (or has already fixed it).

-- Chris

> t com.oracle.graal.graph.GraalInternalError.shouldNotReachHere(GraalInternalError.java:46)
>       at com.oracle.graal.compiler.hsail.HSAILLIRGenerator.emitAdd(HSAILLIRGenerator.java:296)
>       at com.oracle.graal.compiler.hsail.HSAILLIRGenerator.prepareAddress(HSAILLIRGenerator.java:189)
>       at com.oracle.graal.compiler.hsail.HSAILLIRGenerator.emitLoad(HSAILLIRGenerator.java:200)
>       at com.oracle.graal.compiler.hsail.HSAILLIRGenerator.emitLoad(HSAILLIRGenerator.java:1)
>       at com.oracle.graal.nodes.extended.IndexedLocationNode.generateLoad(IndexedLocationNode.java:90)
>       at com.oracle.graal.nodes.extended.FloatingReadNode.generate(FloatingReadNode.java:56)
>       at com.oracle.graal.compiler.gen.LIRGenerator.emitNode(LIRGenerator.java:423)
>       at com.oracle.graal.compiler.hsail.HSAILLIRGenerator.emitNode(HSAILLIRGenerator.java:81)
>       at com.oracle.graal.compiler.gen.LIRGenerator.doRoot(LIRGenerator.java:418)

More information about the graal-dev mailing list