From e83f1d687b6748a1fd6534ac7c8ab93d46e9f1ca Mon Sep 17 00:00:00 2001 From: Xiaohong Gong Date: Fri, 12 Oct 2018 01:42:57 +0000 Subject: [PATCH] Add "addSubShift" rule for AArch64. --- .../aarch64/test/AArch64AddSubShiftTest.java | 188 ++++++++++++++++++ .../aarch64/test/AArch64MatchRuleTest.java | 41 ++++ .../AArch64ArithmeticLIRGenerator.java | 10 + .../core/aarch64/AArch64NodeMatchRules.java | 41 ++++ ...hRuleTest.java => AMD64MatchRuleTest.java} | 27 +-- .../compiler/core/test/MatchRuleTest.java | 72 +++++++ .../compiler/core/gen/NodeLIRBuilder.java | 2 +- .../compiler/core/gen/NodeMatchRules.java | 2 + 8 files changed, 358 insertions(+), 25 deletions(-) create mode 100644 compiler/src/org.graalvm.compiler.core.aarch64.test/src/org/graalvm/compiler/core/aarch64/test/AArch64AddSubShiftTest.java create mode 100644 compiler/src/org.graalvm.compiler.core.aarch64.test/src/org/graalvm/compiler/core/aarch64/test/AArch64MatchRuleTest.java rename compiler/src/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/{MatchRuleTest.java => AMD64MatchRuleTest.java} (73%) create mode 100644 compiler/src/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MatchRuleTest.java diff --git a/compiler/src/org.graalvm.compiler.core.aarch64.test/src/org/graalvm/compiler/core/aarch64/test/AArch64AddSubShiftTest.java b/compiler/src/org.graalvm.compiler.core.aarch64.test/src/org/graalvm/compiler/core/aarch64/test/AArch64AddSubShiftTest.java new file mode 100644 index 000000000000..1e0579e026e1 --- /dev/null +++ b/compiler/src/org.graalvm.compiler.core.aarch64.test/src/org/graalvm/compiler/core/aarch64/test/AArch64AddSubShiftTest.java @@ -0,0 +1,188 @@ +/* + * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, Arm Limited and affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package org.graalvm.compiler.core.aarch64.test; + +import org.graalvm.compiler.lir.LIRInstruction; +import org.graalvm.compiler.lir.aarch64.AArch64ArithmeticOp; +import org.junit.Assert; +import org.junit.Test; + +import java.util.function.Predicate; + +public class AArch64AddSubShiftTest extends AArch64MatchRuleTest { + private static final Predicate predicate = op -> (op instanceof AArch64ArithmeticOp.AddSubShiftOp); + + /** + * addSubShift match rule test for add operation with int type. + */ + private static int addLeftShiftInt(int input) { + int output = (input << 5) + input; + output += output << -5; + output += output << 32; + return output; + } + + private static int addRightShiftInt(int input) { + int output = (input >> 5) + input; + output += output >> -5; + output += output >> 32; + return output; + } + + private static int addUnsignedRightShiftInt(int input) { + int output = (input >>> 5) + input; + output += output >>> -5; + output += output >>> 32; + return output; + } + + private static int addShiftInt(int input) { + return addLeftShiftInt(input) + addRightShiftInt(input) + addUnsignedRightShiftInt(input); + } + + /** + * Check whether the addSubShift match rule in AArch64NodeMatchRules does work for add operation + * with int type and check if the expected LIR instructions show up. + */ + @Test + public void testAddShiftInt() { + int expected = addShiftInt(123); + Result result = executeActual(getResolvedJavaMethod("addShiftInt"), null, 123); + int actual = (int) result.returnValue; + Assert.assertEquals(expected, actual); + + checkLIR("addShiftInt", predicate, 6); + } + + /** + * addSubShift match rule test for add operation with long type. + */ + private static long addLeftShiftLong(long input) { + long output = (input << 5) + input; + output += output << -5; + output += output << 64; + return output; + } + + private static long addRightShiftLong(long input) { + long output = (input >> 5) + input; + output += output >> -5; + output += output >> 64; + return output; + } + + private static long addUnsignedRightShiftLong(long input) { + long output = (input >>> 5) + input; + output += output >>> -5; + output += output >>> 64; + return output; + } + + private static long addShiftLong(long input) { + return addLeftShiftLong(input) + addRightShiftLong(input) + addUnsignedRightShiftLong(input); + } + + /** + * Check whether the addSubShift match rule in AArch64NodeMatchRules does work for add operation + * with long type and check if the expected LIR instructions show up. + */ + @Test + public void testAddShiftLong() { + long expected = addShiftLong(1234567); + Result result = executeActual(getResolvedJavaMethod("addShiftLong"), null, (long) 1234567); + long actual = (long) result.returnValue; + Assert.assertEquals(expected, actual); + + checkLIR("addShiftLong", predicate, 6); + } + + /** + * addSubShift match rule test for sub operation with int type. + */ + private static int subLeftShiftInt(int input0, int input1) { + return input0 - (input1 << 5); + } + + private static int subRightShiftInt(int input0, int input1) { + return input0 - (input1 >> 5); + } + + private static int subUnsignedRightShiftInt(int input0, int input1) { + return input0 - (input1 >>> 5); + } + + private static int subShiftInt(int input0, int input1) { + return subLeftShiftInt(input0, input1) + subRightShiftInt(input0, input1) + subUnsignedRightShiftInt(input0, input1); + } + + /** + * Check whether the addSubShift match rule in AArch64NodeMatchRules does work for sub operation + * with int type and check if the expected LIR instructions show up. + */ + @Test + public void testSubShiftInt() { + int expected = subShiftInt(123, 456); + Result result = executeActual(getResolvedJavaMethod("subShiftInt"), null, 123, 456); + int actual = (int) result.returnValue; + Assert.assertEquals(expected, actual); + + checkLIR("subShiftInt", predicate, 3); + } + + /** + * addSubShift match rule test for sub operation with long type. + */ + private static long subLeftShiftLong(long input0, long input1) { + return input0 - (input1 << 5); + } + + private static long subRightShiftLong(long input0, long input1) { + return input0 - (input1 >> 5); + } + + private static long subUnsignedRightShiftLong(long input0, long input1) { + return input0 - (input1 >>> 5); + } + + private static long subShiftLong(long input0, long input1) { + return subLeftShiftLong(input0, input1) + subRightShiftLong(input0, input1) + subUnsignedRightShiftLong(input0, input1); + } + + /** + * Check whether the addSubShift match rule in AArch64NodeMatchRules does work for sub operation + * with long type and check if the expected LIR instructions show up. + */ + @Test + public void testSubShiftLong() { + long expected = subShiftLong(1234567, 123); + Result result = executeActual(getResolvedJavaMethod("subShiftLong"), null, (long) 1234567, (long) 123); + long actual = (long) result.returnValue; + Assert.assertEquals(expected, actual); + + checkLIR("subShiftLong", predicate, 3); + } +} diff --git a/compiler/src/org.graalvm.compiler.core.aarch64.test/src/org/graalvm/compiler/core/aarch64/test/AArch64MatchRuleTest.java b/compiler/src/org.graalvm.compiler.core.aarch64.test/src/org/graalvm/compiler/core/aarch64/test/AArch64MatchRuleTest.java new file mode 100644 index 000000000000..4eb4ca81fc62 --- /dev/null +++ b/compiler/src/org.graalvm.compiler.core.aarch64.test/src/org/graalvm/compiler/core/aarch64/test/AArch64MatchRuleTest.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, Arm Limited and affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package org.graalvm.compiler.core.aarch64.test; + +import jdk.vm.ci.aarch64.AArch64; +import org.graalvm.compiler.core.test.MatchRuleTest; +import org.junit.Before; + +import static org.junit.Assume.assumeTrue; + +public abstract class AArch64MatchRuleTest extends MatchRuleTest { + @Before + public void checkAArch64() { + assumeTrue("skipping AArch64 specific test", getTarget().arch instanceof AArch64); + } + +} diff --git a/compiler/src/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java b/compiler/src/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java index 5edd5f7d9783..f7ea173e8114 100644 --- a/compiler/src/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java +++ b/compiler/src/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java @@ -201,6 +201,16 @@ public Value emitFloatConvert(FloatConvert op, Value inputVal) { return result; } + public Value emitAddSubShift(AArch64ArithmeticOp op, Value a, Value b, AArch64MacroAssembler.ShiftType shiftType, int shiftAmount) { + assert isNumericInteger(a.getPlatformKind()); + assert isNumericInteger(b.getPlatformKind()); + Variable result = getLIRGen().newVariable(LIRKind.combine(a, b)); + AllocatableValue x = moveSp(asAllocatable(a)); + AllocatableValue y = moveSp(asAllocatable(b)); + getLIRGen().append(new AArch64ArithmeticOp.AddSubShiftOp(op, result, x, y, shiftType, shiftAmount)); + return result; + } + private static PlatformKind getFloatConvertResultKind(FloatConvert op) { switch (op) { case F2I: diff --git a/compiler/src/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java b/compiler/src/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java index d8b9d78eeb28..6709fe4daf3f 100644 --- a/compiler/src/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java +++ b/compiler/src/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java @@ -25,11 +25,22 @@ package org.graalvm.compiler.core.aarch64; +import org.graalvm.compiler.asm.aarch64.AArch64MacroAssembler; import org.graalvm.compiler.core.gen.NodeMatchRules; +import org.graalvm.compiler.core.match.ComplexMatchResult; +import org.graalvm.compiler.core.match.MatchRule; import org.graalvm.compiler.lir.LIRFrameState; +import org.graalvm.compiler.lir.aarch64.AArch64ArithmeticOp; import org.graalvm.compiler.lir.gen.LIRGeneratorTool; +import org.graalvm.compiler.nodes.ConstantNode; import org.graalvm.compiler.nodes.DeoptimizingNode; import org.graalvm.compiler.nodes.NodeView; +import org.graalvm.compiler.nodes.ValueNode; +import org.graalvm.compiler.nodes.calc.AddNode; +import org.graalvm.compiler.nodes.calc.BinaryNode; +import org.graalvm.compiler.nodes.calc.LeftShiftNode; +import org.graalvm.compiler.nodes.calc.RightShiftNode; +import org.graalvm.compiler.nodes.calc.UnsignedRightShiftNode; import org.graalvm.compiler.nodes.memory.Access; import jdk.vm.ci.aarch64.AArch64Kind; @@ -51,6 +62,36 @@ protected AArch64Kind getMemoryKind(Access access) { return (AArch64Kind) gen.getLIRKind(access.asNode().stamp(NodeView.DEFAULT)).getPlatformKind(); } + private ComplexMatchResult emitAddSubShift(AArch64ArithmeticOp op, ValueNode value, BinaryNode shift) { + assert shift.getY() instanceof ConstantNode; + int shiftAmount = shift.getY().asJavaConstant().asInt(); + + if (shift instanceof LeftShiftNode) { + return builder -> getArithmeticLIRGenerator().emitAddSubShift(op, operand(value), operand(shift.getX()), + AArch64MacroAssembler.ShiftType.LSL, shiftAmount); + } else if (shift instanceof RightShiftNode) { + return builder -> getArithmeticLIRGenerator().emitAddSubShift(op, operand(value), operand(shift.getX()), + AArch64MacroAssembler.ShiftType.ASR, shiftAmount); + } else { + assert shift instanceof UnsignedRightShiftNode; + return builder -> getArithmeticLIRGenerator().emitAddSubShift(op, operand(value), operand(shift.getX()), + AArch64MacroAssembler.ShiftType.LSR, shiftAmount); + } + } + + @MatchRule("(Add=binary a (LeftShift=shift b Constant))") + @MatchRule("(Add=binary a (RightShift=shift b Constant))") + @MatchRule("(Add=binary a (UnsignedRightShift=shift b Constant))") + @MatchRule("(Sub=binary a (LeftShift=shift b Constant))") + @MatchRule("(Sub=binary a (RightShift=shift b Constant))") + @MatchRule("(Sub=binary a (UnsignedRightShift=shift b Constant))") + public ComplexMatchResult addSubShift(BinaryNode binary, ValueNode a, BinaryNode shift) { + if (binary instanceof AddNode) { + return emitAddSubShift(AArch64ArithmeticOp.ADD, a, shift); + } + return emitAddSubShift(AArch64ArithmeticOp.SUB, a, shift); + } + @Override public AArch64LIRGenerator getLIRGeneratorTool() { return (AArch64LIRGenerator) gen; diff --git a/compiler/src/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/MatchRuleTest.java b/compiler/src/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/AMD64MatchRuleTest.java similarity index 73% rename from compiler/src/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/MatchRuleTest.java rename to compiler/src/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/AMD64MatchRuleTest.java index 4774338431bd..8c7139ab495c 100644 --- a/compiler/src/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/MatchRuleTest.java +++ b/compiler/src/org.graalvm.compiler.core.amd64.test/src/org/graalvm/compiler/core/amd64/test/AMD64MatchRuleTest.java @@ -26,24 +26,16 @@ import static org.junit.Assume.assumeTrue; +import org.graalvm.compiler.core.test.MatchRuleTest; import org.graalvm.compiler.lir.LIR; import org.graalvm.compiler.lir.LIRInstruction; import org.graalvm.compiler.lir.amd64.AMD64BinaryConsumer.MemoryConstOp; -import org.graalvm.compiler.lir.gen.LIRGenerationResult; -import org.graalvm.compiler.lir.jtt.LIRTest; -import org.graalvm.compiler.lir.phases.LIRPhase; -import org.graalvm.compiler.lir.phases.LIRSuites; -import org.graalvm.compiler.lir.phases.PreAllocationOptimizationPhase.PreAllocationOptimizationContext; -import org.graalvm.compiler.options.OptionValues; import org.junit.Before; import org.junit.Test; import jdk.vm.ci.amd64.AMD64; -import jdk.vm.ci.code.TargetDescription; - -public class MatchRuleTest extends LIRTest { - private LIR lir; +public class AMD64MatchRuleTest extends MatchRuleTest { @Before public void checkAMD64() { assumeTrue("skipping AMD64 specific test", getTarget().arch instanceof AMD64); @@ -57,13 +49,6 @@ public static int test1Snippet(TestClass o, TestClass b, TestClass c) { } } - @Override - protected LIRSuites createLIRSuites(OptionValues options) { - LIRSuites suites = super.createLIRSuites(options); - suites.getPreAllocationOptimizationStage().appendPhase(new CheckPhase()); - return suites; - } - /** * Verifies, if the match rules in AMD64NodeMatchRules do work on the graphs by compiling and * checking if the expected LIR instruction show up. @@ -71,6 +56,7 @@ protected LIRSuites createLIRSuites(OptionValues options) { @Test public void test1() { compile(getResolvedJavaMethod("test1Snippet"), null); + LIR lir = getLIR(); boolean found = false; for (LIRInstruction ins : lir.getLIRforBlock(lir.codeEmittingOrder()[0])) { if (ins instanceof MemoryConstOp && ((MemoryConstOp) ins).getOpcode().toString().equals("CMP")) { @@ -91,11 +77,4 @@ public TestClass(int x) { this.x = x; } } - - public class CheckPhase extends LIRPhase { - @Override - protected void run(TargetDescription target, LIRGenerationResult lirGenRes, PreAllocationOptimizationContext context) { - lir = lirGenRes.getLIR(); - } - } } diff --git a/compiler/src/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MatchRuleTest.java b/compiler/src/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MatchRuleTest.java new file mode 100644 index 000000000000..dba10bf33633 --- /dev/null +++ b/compiler/src/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MatchRuleTest.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package org.graalvm.compiler.core.test; + +import org.graalvm.compiler.lir.LIR; +import org.graalvm.compiler.lir.LIRInstruction; +import org.graalvm.compiler.lir.gen.LIRGenerationResult; +import org.graalvm.compiler.lir.phases.LIRPhase; +import org.graalvm.compiler.lir.phases.LIRSuites; +import org.graalvm.compiler.lir.phases.PreAllocationOptimizationPhase.PreAllocationOptimizationContext; +import org.graalvm.compiler.options.OptionValues; + +import jdk.vm.ci.code.TargetDescription; +import org.junit.Assert; + +import java.util.function.Predicate; + +public abstract class MatchRuleTest extends GraalCompilerTest { + private LIR lir; + + protected LIR getLIR() { + return lir; + } + + @Override + protected LIRSuites createLIRSuites(OptionValues options) { + LIRSuites suites = super.createLIRSuites(options); + suites.getPreAllocationOptimizationStage().appendPhase(new CheckPhase()); + return suites; + } + + public class CheckPhase extends LIRPhase { + @Override + protected void run(TargetDescription target, LIRGenerationResult lirGenRes, PreAllocationOptimizationContext context) { + lir = lirGenRes.getLIR(); + } + } + + protected void checkLIR(String methodName, Predicate predicate, int expected) { + compile(getResolvedJavaMethod(methodName), null); + int actualOpNum = 0; + for (LIRInstruction ins : lir.getLIRforBlock(lir.codeEmittingOrder()[0])) { + if (predicate.test(ins)) { + actualOpNum++; + } + } + Assert.assertEquals(expected, actualOpNum); + } + +} diff --git a/compiler/src/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeLIRBuilder.java b/compiler/src/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeLIRBuilder.java index c2fd036298fc..7505d6a3b1c9 100644 --- a/compiler/src/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeLIRBuilder.java +++ b/compiler/src/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeLIRBuilder.java @@ -366,6 +366,7 @@ public void doBlock(Block block, StructuredGraph graph, BlockMap> blo for (int i = 0; i < nodes.size(); i++) { Node node = nodes.get(i); if (node instanceof ValueNode) { + setSourcePosition(node.getNodeSourcePosition()); DebugContext debug = node.getDebug(); ValueNode valueNode = (ValueNode) node; if (trace) { @@ -466,7 +467,6 @@ protected void emitNode(ValueNode node) { if (node.getDebug().isLogEnabled() && node.stamp(NodeView.DEFAULT).isEmpty()) { node.getDebug().log("This node has an empty stamp, we are emitting dead code(?): %s", node); } - setSourcePosition(node.getNodeSourcePosition()); if (node instanceof LIRLowerable) { ((LIRLowerable) node).generate(this); } else { diff --git a/compiler/src/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeMatchRules.java b/compiler/src/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeMatchRules.java index bf3423fbcd88..04057f9a8656 100644 --- a/compiler/src/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeMatchRules.java +++ b/compiler/src/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeMatchRules.java @@ -53,6 +53,7 @@ import org.graalvm.compiler.nodes.calc.OrNode; import org.graalvm.compiler.nodes.calc.PointerEqualsNode; import org.graalvm.compiler.nodes.calc.ReinterpretNode; +import org.graalvm.compiler.nodes.calc.RightShiftNode; import org.graalvm.compiler.nodes.calc.SignExtendNode; import org.graalvm.compiler.nodes.calc.SubNode; import org.graalvm.compiler.nodes.calc.UnsignedRightShiftNode; @@ -97,6 +98,7 @@ @MatchableNode(nodeClass = PiNode.class, inputs = {"object"}) @MatchableNode(nodeClass = LogicCompareAndSwapNode.class, inputs = {"address", "expectedValue", "newValue"}) @MatchableNode(nodeClass = ValueCompareAndSwapNode.class, inputs = {"address", "expectedValue", "newValue"}) +@MatchableNode(nodeClass = RightShiftNode.class, inputs = {"x", "y"}) public abstract class NodeMatchRules { NodeLIRBuilder lirBuilder;