# HG changeset patch # User Christos Kotselidis # Date 1372325014 -7200 # Node ID 01c902c59e38313d8c783b6a736c8c3666aaf176 # Parent a6d6e6afd89734de48b74e5711e1c14b086e497a Replace unsafe load with readCompressed while reading the previous value in G1 pre barriers (Avoids guard insertion after guard lowering) diff -r a6d6e6afd897 -r 01c902c59e38 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java Thu Jun 27 11:22:27 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java Thu Jun 27 11:23:34 2013 +0200 @@ -111,7 +111,7 @@ // If the previous value has to be loaded (before the write), the load is issued. // The load is always issued except the cases of CAS and referent field. if (doLoad) { - previousOop = (Word) Word.fromObject(UnsafeLoadNode.load(field, 0, 0, Kind.Object)); + previousOop = (Word) Word.fromObject(field.readObjectCompressed(0)); } // If the previous value is null the barrier should not be issued. if (previousOop.notEqual(0)) {