changeset 7342:c10ee98124e3

short-circuit isAssignableFrom test in arraycopy intrinsification
author Doug Simon <doug.simon@oracle.com>
date Sat, 12 Jan 2013 00:11:23 +0100
parents d947dd27a763
children 62554b96c682
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/IntrinsifyArrayCopyPhase.java
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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;
+                        }
+                    }
                 }
             }