--- old/src/share/vm/opto/mathexactnode.cpp 2013-10-11 13:48:38.569328213 +0200 +++ new/src/share/vm/opto/mathexactnode.cpp 2013-10-11 13:48:38.465328216 +0200 @@ -25,9 +25,10 @@ #include "precompiled.hpp" #include "memory/allocation.inline.hpp" #include "opto/addnode.hpp" +#include "opto/cfgnode.hpp" #include "opto/machnode.hpp" -#include "opto/mathexactnode.hpp" #include "opto/matcher.hpp" +#include "opto/mathexactnode.hpp" #include "opto/subnode.hpp" MathExactNode::MathExactNode(Node* ctrl, Node* n1, Node* n2) : MultiNode(3) { @@ -36,6 +37,23 @@ init_req(2, n2); } +Node* MathExactNode::control_node() const { + Node* flags = flags_node(); + BoolNode* boolnode = flags->unique_out()->as_Bool(); + IfNode* iff = boolnode->unique_out()->as_If(); + return iff->in(0); +} + +Node* MathExactNode::non_throwing_branch() const { + Node* flags = flags_node(); + BoolNode* boolnode = flags->unique_out()->as_Bool(); + IfNode* iff = boolnode->unique_out()->as_If(); + if (boolnode->_test._test == BoolTest::overflow) { + return iff->proj_out(0); + } + return iff->proj_out(1); +} + Node* AddExactINode::match(const ProjNode* proj, const Matcher* m) { uint ideal_reg = proj->ideal_reg(); RegMask rm;