use of org.graalvm.compiler.nodes.calc.NegateNode in project graal by oracle.
the class AMD64AddressLoweringTest method convertTwoLevelsOfNegatedShiftedBaseAndNegatedIndexToDisplacement.
@Test
public void convertTwoLevelsOfNegatedShiftedBaseAndNegatedIndexToDisplacement() {
ValueNode base = graph.addOrUniqueWithInputs(new NegateNode(new LeftShiftNode(new NegateNode(new LeftShiftNode(const64(500), const32(1))), const32(1))));
ValueNode index = graph.addOrUniqueWithInputs(new NegateNode(new AddNode(new NegateNode(const64(13)), const64(3))));
AddressNode result = lowering.lower(base, index);
assertAddress(result, null, null, Scale.Times4, 2010);
}
Aggregations