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

src/share/vm/opto/cfgnode.cpp

Print this page
rev 10052 : 8147853: "assert(t->meet(t0) == t) failed: Not monotonic" with sun/util/calendar/zi/TestZoneInfo310.java
Summary: type of counted loop Phi may be saturated before special code to handle counted loops kicks in
Reviewed-by:


1045     if (jt != ft && jt->base() == ft->base()) {
1046       if (jt->isa_int() &&
1047           jt->is_int()->_lo == ft->is_int()->_lo &&
1048           jt->is_int()->_hi == ft->is_int()->_hi)
1049         jt = ft;
1050       if (jt->isa_long() &&
1051           jt->is_long()->_lo == ft->is_long()->_lo &&
1052           jt->is_long()->_hi == ft->is_long()->_hi)
1053         jt = ft;
1054     }
1055     if (jt != ft) {
1056       tty->print("merge type:  "); t->dump(); tty->cr();
1057       tty->print("kill type:   "); _type->dump(); tty->cr();
1058       tty->print("join type:   "); jt->dump(); tty->cr();
1059       tty->print("filter type: "); ft->dump(); tty->cr();
1060     }
1061     assert(jt == ft, "");
1062   }
1063 #endif //ASSERT
1064 









1065   // Deal with conversion problems found in data loops.
1066   ft = phase->saturate(ft, phase->type_or_null(this), _type);
1067 
1068   return ft;
1069 }
1070 
1071 
1072 //------------------------------is_diamond_phi---------------------------------
1073 // Does this Phi represent a simple well-shaped diamond merge?  Return the
1074 // index of the true path or 0 otherwise.
1075 // If check_control_only is true, do not inspect the If node at the
1076 // top, and return -1 (not an edge number) on success.
1077 int PhiNode::is_diamond_phi(bool check_control_only) const {
1078   // Check for a 2-path merge
1079   Node *region = in(0);
1080   if( !region ) return 0;
1081   if( region->req() != 3 ) return 0;
1082   if(         req() != 3 ) return 0;
1083   // Check that both paths come from the same If
1084   Node *ifp1 = region->in(1);




1045     if (jt != ft && jt->base() == ft->base()) {
1046       if (jt->isa_int() &&
1047           jt->is_int()->_lo == ft->is_int()->_lo &&
1048           jt->is_int()->_hi == ft->is_int()->_hi)
1049         jt = ft;
1050       if (jt->isa_long() &&
1051           jt->is_long()->_lo == ft->is_long()->_lo &&
1052           jt->is_long()->_hi == ft->is_long()->_hi)
1053         jt = ft;
1054     }
1055     if (jt != ft) {
1056       tty->print("merge type:  "); t->dump(); tty->cr();
1057       tty->print("kill type:   "); _type->dump(); tty->cr();
1058       tty->print("join type:   "); jt->dump(); tty->cr();
1059       tty->print("filter type: "); ft->dump(); tty->cr();
1060     }
1061     assert(jt == ft, "");
1062   }
1063 #endif //ASSERT
1064 
1065   if (l && ((const Node*)l->phi() == this) &&
1066       phase->type(l->in(LoopNode::LoopBackControl)) == Type::TOP) {
1067     // During CCP, if we saturate the type of a counted loop's Phi
1068     // before the special code for counted loop above has a chance to
1069     // run (that is as long as the type of the backedge's control is
1070     // top), we might end up with non monotonic types
1071     return ft;
1072   }
1073 
1074   // Deal with conversion problems found in data loops.
1075   ft = phase->saturate(ft, phase->type_or_null(this), _type);
1076 
1077   return ft;
1078 }
1079 
1080 
1081 //------------------------------is_diamond_phi---------------------------------
1082 // Does this Phi represent a simple well-shaped diamond merge?  Return the
1083 // index of the true path or 0 otherwise.
1084 // If check_control_only is true, do not inspect the If node at the
1085 // top, and return -1 (not an edge number) on success.
1086 int PhiNode::is_diamond_phi(bool check_control_only) const {
1087   // Check for a 2-path merge
1088   Node *region = in(0);
1089   if( !region ) return 0;
1090   if( region->req() != 3 ) return 0;
1091   if(         req() != 3 ) return 0;
1092   // Check that both paths come from the same If
1093   Node *ifp1 = region->in(1);


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