question about testing arrays

Venkatachalam, Vasanth Vasanth.Venkatachalam at
Mon Mar 4 16:16:42 PST 2013

Hi Thomas,

I tried running the following similar test case inside BasicPTXTest:

     public static int arraysquares(int array1[]) {

     return array1[0];

When I run this in PTX mode, I get the error below. Can you explain how to get past this in PTX?
I was initially seeing the same error in HSAIL until I implemented the Guard instruction, at which point I got the "ICMP receiving a constant" error alluded to earlier.


1) test1( java.lang.InternalError: NYI
        at node: 18|!Guard

-----Original Message-----
From: Thomas Wuerthinger [mailto:thomas.wuerthinger at]
Sent: Monday, March 04, 2013 4:08 PM
To: Venkatachalam, Vasanth
Cc: graal-dev at
Subject: Re: question about testing arrays

No, the issue is caused by the operand to the compare instruction not expecting a constant but a register. This is why I was asking you if an operand to an HSAIL compare instruction may also be a constant directly? Or does HSAIL require the constant be loaded into a register first?

- thomas

More information about the graal-dev mailing list