< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/BasicInductionVariable.java

Print this page

        

*** 141,160 **** } throw GraalError.shouldNotReachHere(); } @Override ! public ValueNode extremumNode(boolean assumePositiveTripCount, Stamp stamp) { Stamp fromStamp = phi.stamp(NodeView.DEFAULT); StructuredGraph graph = graph(); ValueNode stride = strideNode(); ValueNode initNode = this.initNode(); if (!fromStamp.isCompatible(stamp)) { stride = IntegerConvertNode.convert(stride, stamp, graph(), NodeView.DEFAULT); initNode = IntegerConvertNode.convert(initNode, stamp, graph(), NodeView.DEFAULT); } ! ValueNode maxTripCount = loop.counted().maxTripCountNode(assumePositiveTripCount); if (!maxTripCount.stamp(NodeView.DEFAULT).isCompatible(stamp)) { maxTripCount = IntegerConvertNode.convert(maxTripCount, stamp, graph(), NodeView.DEFAULT); } return add(graph, mul(graph, stride, sub(graph, maxTripCount, ConstantNode.forIntegerStamp(stamp, 1, graph))), initNode); } --- 141,160 ---- } throw GraalError.shouldNotReachHere(); } @Override ! public ValueNode extremumNode(boolean assumeLoopEntered, Stamp stamp) { Stamp fromStamp = phi.stamp(NodeView.DEFAULT); StructuredGraph graph = graph(); ValueNode stride = strideNode(); ValueNode initNode = this.initNode(); if (!fromStamp.isCompatible(stamp)) { stride = IntegerConvertNode.convert(stride, stamp, graph(), NodeView.DEFAULT); initNode = IntegerConvertNode.convert(initNode, stamp, graph(), NodeView.DEFAULT); } ! ValueNode maxTripCount = loop.counted().maxTripCountNode(assumeLoopEntered); if (!maxTripCount.stamp(NodeView.DEFAULT).isCompatible(stamp)) { maxTripCount = IntegerConvertNode.convert(maxTripCount, stamp, graph(), NodeView.DEFAULT); } return add(graph, mul(graph, stride, sub(graph, maxTripCount, ConstantNode.forIntegerStamp(stamp, 1, graph))), initNode); }
< prev index next >