# HG changeset patch # User Doug Simon # Date 1358261044 -3600 # Node ID 53d5f5fc4dd91425e23e542a60898f3a6b1fa59e # Parent 27ee289ec5a7f23d21306d182c2d0586624fc81c an intrinsic graph must be cloned before being compiled diff -r 27ee289ec5a7 -r 53d5f5fc4dd9 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Tue Jan 15 11:10:59 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Tue Jan 15 15:44:04 2013 +0100 @@ -134,7 +134,8 @@ if (graph == null || entryBCI != INVOCATION_ENTRY_BCI) { graph = new StructuredGraph(method, entryBCI); } else { - // Compiling an intrinsic graph + // Compiling an intrinsic graph - must clone the graph + graph = graph.copy(); } return graalRuntime.getCompiler().compileMethod(method, graph, graalRuntime.getCache(), plan, optimisticOpts); } diff -r 27ee289ec5a7 -r 53d5f5fc4dd9 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java Tue Jan 15 11:10:59 2013 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java Tue Jan 15 15:44:04 2013 +0100 @@ -1033,7 +1033,8 @@ } public static boolean canIntrinsify(Invoke invoke, ResolvedJavaMethod target) { - return getIntrinsicGraph(invoke, target) != null; + StructuredGraph intrinsicGraph = getIntrinsicGraph(invoke, target); + return intrinsicGraph != null; } public static StructuredGraph getIntrinsicGraph(Invoke invoke, ResolvedJavaMethod target) {