Mercurial > hg > graal-compiler
diff src/share/vm/opto/multnode.cpp @ 12323:c9ccd7b85f20
8024924: Intrinsify java.lang.Math.addExact
Reviewed-by: kvn, twisti
author | rbackman |
---|---|
date | Fri, 27 Sep 2013 08:39:19 +0200 |
parents | 6f3fd5150b67 |
children | 3213ba4d3dff |
line wrap: on
line diff
--- a/src/share/vm/opto/multnode.cpp Thu Sep 26 12:07:53 2013 -0700 +++ b/src/share/vm/opto/multnode.cpp Fri Sep 27 08:39:19 2013 +0200 @@ -25,6 +25,7 @@ #include "precompiled.hpp" #include "opto/callnode.hpp" #include "opto/matcher.hpp" +#include "opto/mathexactnode.hpp" #include "opto/multnode.hpp" #include "opto/opcodes.hpp" #include "opto/phaseX.hpp" @@ -46,15 +47,21 @@ assert(Opcode() != Op_If || outcnt() == 2, "bad if #1"); for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) { Node *p = fast_out(i); - if( !p->is_Proj() ) { + if (p->is_Proj()) { + ProjNode *proj = p->as_Proj(); + if (proj->_con == which_proj) { + assert(Opcode() != Op_If || proj->Opcode() == (which_proj?Op_IfTrue:Op_IfFalse), "bad if #2"); + return proj; + } + } else if (p->is_FlagsProj()) { + FlagsProjNode *proj = p->as_FlagsProj(); + if (proj->_con == which_proj) { + return proj; + } + } else { assert(p == this && this->is_Start(), "else must be proj"); continue; } - ProjNode *proj = p->as_Proj(); - if( proj->_con == which_proj ) { - assert(Opcode() != Op_If || proj->Opcode() == (which_proj?Op_IfTrue:Op_IfFalse), "bad if #2"); - return proj; - } } return NULL; }