# HG changeset patch # User Doug Simon # Date 1357945883 -3600 # Node ID c10ee98124e3cdf98dc6e74216d175c67fc95eed # Parent d947dd27a763bf4284123d0aa77e254bd6028bbe short-circuit isAssignableFrom test in arraycopy intrinsification diff -r d947dd27a763 -r c10ee98124e3 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/IntrinsifyArrayCopyPhase.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/IntrinsifyArrayCopyPhase.java Sat Jan 12 00:10:17 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/IntrinsifyArrayCopyPhase.java Sat Jan 12 00:11:23 2013 +0100 @@ -110,11 +110,11 @@ snippetMethod = doubleArrayCopy; } } -// } else if (destType.getComponentType().isAssignableFrom(srcType.getComponentType())) { -// if (destStamp.isExactType()) { -// snippetMethod = objectArrayCopy; -// } -// } + } else if (destType.getComponentType() == srcType.getComponentType() || destType.getComponentType().isAssignableFrom(srcType.getComponentType())) { + if (destStamp.isExactType()) { + snippetMethod = objectArrayCopy; + } + } } }