src/share/vm/opto/phaseX.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/phaseX.cpp

Print this page
rev 7450 : 8066045: opto/node.hpp:355, assert(i < _max) failed: oob: i=1, _max=1
Summary: code in PhaseIterGVN::add_users_to_worklist() from 8054478 makes incorrect assumption about graph shape
Reviewed-by:


1414             // Look for the 'is_x2logic' pattern: "x ? : 0 : 1" and put the
1415             // phi merging either 0 or 1 onto the worklist
1416             Node* ifproj0 = iff->raw_out(0);
1417             Node* ifproj1 = iff->raw_out(1);
1418             if (ifproj0->outcnt() > 0 && ifproj1->outcnt() > 0) {
1419               Node* region0 = ifproj0->raw_out(0);
1420               Node* region1 = ifproj1->raw_out(0);
1421               if( region0 == region1 )
1422                 add_users_to_worklist0(region0);
1423             }
1424           }
1425         }
1426       }
1427       if (use_op == Op_CmpI) {
1428         Node* in1 = use->in(1);
1429         for (uint i = 0; i < in1->outcnt(); i++) {
1430           if (in1->raw_out(i)->Opcode() == Op_CastII) {
1431             Node* castii = in1->raw_out(i);
1432             if (castii->in(0) != NULL && castii->in(0)->in(0) != NULL && castii->in(0)->in(0)->is_If()) {
1433               Node* ifnode = castii->in(0)->in(0);
1434               if (ifnode->in(1) != NULL && ifnode->in(1)->in(1) == use) {
1435                 // Reprocess a CastII node that may depend on an
1436                 // opaque node value when the opaque node is
1437                 // removed. In case it carries a dependency we can do
1438                 // a better job of computing its type.
1439                 _worklist.push(castii);
1440               }
1441             }
1442           }
1443         }
1444       }
1445     }
1446 
1447     // If changed Cast input, check Phi users for simple cycles
1448     if( use->is_ConstraintCast() || use->is_CheckCastPP() ) {
1449       for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) {
1450         Node* u = use->fast_out(i2);
1451         if (u->is_Phi())
1452           _worklist.push(u);
1453       }
1454     }




1414             // Look for the 'is_x2logic' pattern: "x ? : 0 : 1" and put the
1415             // phi merging either 0 or 1 onto the worklist
1416             Node* ifproj0 = iff->raw_out(0);
1417             Node* ifproj1 = iff->raw_out(1);
1418             if (ifproj0->outcnt() > 0 && ifproj1->outcnt() > 0) {
1419               Node* region0 = ifproj0->raw_out(0);
1420               Node* region1 = ifproj1->raw_out(0);
1421               if( region0 == region1 )
1422                 add_users_to_worklist0(region0);
1423             }
1424           }
1425         }
1426       }
1427       if (use_op == Op_CmpI) {
1428         Node* in1 = use->in(1);
1429         for (uint i = 0; i < in1->outcnt(); i++) {
1430           if (in1->raw_out(i)->Opcode() == Op_CastII) {
1431             Node* castii = in1->raw_out(i);
1432             if (castii->in(0) != NULL && castii->in(0)->in(0) != NULL && castii->in(0)->in(0)->is_If()) {
1433               Node* ifnode = castii->in(0)->in(0);
1434               if (ifnode->in(1) != NULL && ifnode->in(1)->is_Bool() && ifnode->in(1)->in(1) == use) {
1435                 // Reprocess a CastII node that may depend on an
1436                 // opaque node value when the opaque node is
1437                 // removed. In case it carries a dependency we can do
1438                 // a better job of computing its type.
1439                 _worklist.push(castii);
1440               }
1441             }
1442           }
1443         }
1444       }
1445     }
1446 
1447     // If changed Cast input, check Phi users for simple cycles
1448     if( use->is_ConstraintCast() || use->is_CheckCastPP() ) {
1449       for (DUIterator_Fast i2max, i2 = use->fast_outs(i2max); i2 < i2max; i2++) {
1450         Node* u = use->fast_out(i2);
1451         if (u->is_Phi())
1452           _worklist.push(u);
1453       }
1454     }


src/share/vm/opto/phaseX.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File