src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/UnsafeEATest.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
35 import org.graalvm.compiler.nodes.calc.UnpackEndianHalfNode; |
35 import org.graalvm.compiler.nodes.calc.UnpackEndianHalfNode; |
36 import org.graalvm.compiler.nodes.extended.RawLoadNode; |
36 import org.graalvm.compiler.nodes.extended.RawLoadNode; |
37 import org.graalvm.compiler.nodes.extended.RawStoreNode; |
37 import org.graalvm.compiler.nodes.extended.RawStoreNode; |
38 import org.graalvm.compiler.nodes.extended.UnsafeAccessNode; |
38 import org.graalvm.compiler.nodes.extended.UnsafeAccessNode; |
39 import org.graalvm.compiler.nodes.java.LoadFieldNode; |
39 import org.graalvm.compiler.nodes.java.LoadFieldNode; |
40 import org.graalvm.compiler.phases.common.CanonicalizerPhase; |
|
41 import org.junit.Assert; |
40 import org.junit.Assert; |
42 import org.junit.Test; |
41 import org.junit.Test; |
43 |
42 |
44 import jdk.vm.ci.meta.JavaConstant; |
43 import jdk.vm.ci.meta.JavaConstant; |
45 import jdk.vm.ci.meta.JavaKind; |
44 import jdk.vm.ci.meta.JavaKind; |
121 // Simplify any UnpackEndianHalfNode so we end up with constants. |
120 // Simplify any UnpackEndianHalfNode so we end up with constants. |
122 Graph.Mark mark = graph.getMark(); |
121 Graph.Mark mark = graph.getMark(); |
123 for (UnpackEndianHalfNode node : graph.getNodes().filter(UnpackEndianHalfNode.class)) { |
122 for (UnpackEndianHalfNode node : graph.getNodes().filter(UnpackEndianHalfNode.class)) { |
124 node.lower(getTarget().arch.getByteOrder()); |
123 node.lower(getTarget().arch.getByteOrder()); |
125 } |
124 } |
126 new CanonicalizerPhase().applyIncremental(graph, context, mark); |
125 createCanonicalizerPhase().applyIncremental(graph, context, mark); |
127 } |
126 } |
128 |
127 |
129 private boolean testingUnsafe; |
128 private boolean testingUnsafe; |
130 |
129 |
131 @Test |
130 @Test |