Skip to content

Commit

Permalink
Update test to use LoweredAtomicReadAndAddNode.
Browse files Browse the repository at this point in the history
  • Loading branch information
axel22 committed Sep 9, 2020
1 parent b1fdba9 commit 0116e2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
import jdk.vm.ci.meta.ValueKind;

/**
* Represents the lowered version of an atomic read-and-write operation like
* {@link sun.misc.Unsafe#getAndSetInt(Object, long, int)}.
* Represents the lowered version of an atomic read-and-add operation like
* {@link sun.misc.Unsafe#getAndAddInt(Object, long, int)}.
*/
@NodeInfo(allowedUsageTypes = {Memory}, cycles = CYCLES_8, size = SIZE_2)
public final class LoweredAtomicReadAndAddNode extends FixedAccessNode implements StateSplit, LIRLowerableAccess, SingleMemoryKill {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.calc.AddNode;
import org.graalvm.compiler.nodes.java.AtomicReadAndAddNode;
import org.graalvm.compiler.nodes.java.LoweredAtomicReadAndAddNode;
import org.graalvm.compiler.nodes.java.MethodCallTargetNode;
import org.graalvm.compiler.nodes.memory.ReadNode;
import org.graalvm.compiler.nodes.memory.WriteNode;
Expand Down Expand Up @@ -203,7 +204,7 @@ public void testStatementLimitContextMultiThread() throws InterruptedException {
Assert.assertEquals(1, countNodes(graph, MethodCallTargetNode.TYPE));
Assert.assertEquals(6, countNodes(graph, AtomicReadAndAddNode.TYPE));
compile(target, graph);
Assert.assertEquals(6, countNodes(graph, AtomicReadAndAddNode.TYPE));
Assert.assertEquals(6, countNodes(graph, LoweredAtomicReadAndAddNode.TYPE));
Assert.assertEquals(1, countNodes(graph, InvokeWithExceptionNode.TYPE));
}
}
Expand Down

0 comments on commit 0116e2e

Please sign in to comment.