src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LongNodeChainTest.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 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.StructuredGraph; |
35 import org.graalvm.compiler.nodes.StructuredGraph; |
36 import org.graalvm.compiler.nodes.ValueNode; |
36 import org.graalvm.compiler.nodes.ValueNode; |
37 import org.graalvm.compiler.nodes.calc.AddNode; |
37 import org.graalvm.compiler.nodes.calc.AddNode; |
38 import org.graalvm.compiler.nodes.extended.OpaqueNode; |
38 import org.graalvm.compiler.nodes.extended.OpaqueNode; |
39 import org.graalvm.compiler.options.OptionValues; |
39 import org.graalvm.compiler.options.OptionValues; |
40 import org.graalvm.compiler.phases.common.CanonicalizerPhase; |
|
41 import org.graalvm.compiler.phases.schedule.SchedulePhase; |
40 import org.graalvm.compiler.phases.schedule.SchedulePhase; |
42 import org.graalvm.compiler.phases.schedule.SchedulePhase.SchedulingStrategy; |
41 import org.graalvm.compiler.phases.schedule.SchedulePhase.SchedulingStrategy; |
43 import org.graalvm.compiler.phases.tiers.HighTierContext; |
42 import org.graalvm.compiler.phases.tiers.HighTierContext; |
44 |
43 |
45 public class LongNodeChainTest extends GraalCompilerTest { |
44 public class LongNodeChainTest extends GraalCompilerTest { |
83 |
82 |
84 for (SchedulingStrategy s : Strategies) { |
83 for (SchedulingStrategy s : Strategies) { |
85 new SchedulePhase(s).apply(graph); |
84 new SchedulePhase(s).apply(graph); |
86 } |
85 } |
87 |
86 |
88 new CanonicalizerPhase().apply(graph, context); |
87 this.createCanonicalizerPhase().apply(graph, context); |
89 JavaConstant asConstant = (JavaConstant) returnNode.result().asConstant(); |
88 JavaConstant asConstant = (JavaConstant) returnNode.result().asConstant(); |
90 Assert.assertEquals(N + 1, asConstant.asInt()); |
89 Assert.assertEquals(N + 1, asConstant.asInt()); |
91 } |
90 } |
92 } |
91 } |