CompareAndSwapNode support

Deneau, Tom tom.deneau at amd.com
Thu Oct 24 13:20:36 PDT 2013


In the HSAIL backend, we had support for CompareAndSwapNode.  (we had not pushed this out to the trunk yet).

As part of the merge with the new runtime infrastructure changes, I see that our CompareAndSwapNode  support is broken.
I'm trying to understand how to get it working again.

In the particular test I'm looking at the java code calls atomicInt.getAndAdd(constant)

First I noticed that we were getting Invoke nodes for things like getIntVolatile and compareAndSwapInt.
So I assumed the UnsafeSubstitutions needed to be enabled for our backend.

When I enabled these, I got the following error which doesn't mean anything to me...

java.lang.AssertionError: <unknown> has unexpected usage 20|LoadField#value of checkcast 19|GuardingPi at <unknown>
                at com.oracle.graal.replacements.NodeIntrinsificationPhase.checkCheckCastUsage(NodeIntrinsificationPhase.java:387)
                at com.oracle.graal.replacements.NodeIntrinsificationPhase.checkCheckCastUsage(NodeIntrinsificationPhase.java:382)
                at com.oracle.graal.replacements.NodeIntrinsificationPhase.cleanUpReturnCheckCast(NodeIntrinsificationPhase.java:328)
                at com.oracle.graal.replacements.NodeIntrinsificationPhase.run(NodeIntrinsificationPhase.java:67)

Any suggestions?

-- Tom



More information about the graal-dev mailing list