src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BitOpNodesTest.java
changeset 58877 aec7bf35d6f5
parent 52910 583fd71c47d6
equal deleted inserted replaced
58876:1a8d65e71a66 58877:aec7bf35d6f5
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 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.
   301      * @return the returned value or null if {@code expectedClass} is not found in the graph.
   301      * @return the returned value or null if {@code expectedClass} is not found in the graph.
   302      */
   302      */
   303     private ValueNode parseAndInline(String name, Class<? extends ValueNode> expectedClass) {
   303     private ValueNode parseAndInline(String name, Class<? extends ValueNode> expectedClass) {
   304         StructuredGraph graph = parseEager(name, AllowAssumptions.YES);
   304         StructuredGraph graph = parseEager(name, AllowAssumptions.YES);
   305         HighTierContext context = getDefaultHighTierContext();
   305         HighTierContext context = getDefaultHighTierContext();
   306         CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
   306         CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
   307         canonicalizer.apply(graph, context);
   307         canonicalizer.apply(graph, context);
   308         createInliningPhase(canonicalizer).apply(graph, context);
   308         createInliningPhase(canonicalizer).apply(graph, context);
   309         canonicalizer.apply(graph, context);
   309         canonicalizer.apply(graph, context);
   310         Assert.assertEquals(1, graph.getNodes(ReturnNode.TYPE).count());
   310         Assert.assertEquals(1, graph.getNodes(ReturnNode.TYPE).count());
   311         if (expectedClass != null) {
   311         if (expectedClass != null) {