< prev index next >

src/hotspot/share/opto/compile.cpp

Print this page




3230     break;
3231 
3232   case Op_PackB:
3233   case Op_PackS:
3234   case Op_PackI:
3235   case Op_PackF:
3236   case Op_PackL:
3237   case Op_PackD:
3238     if (n->req()-1 > 2) {
3239       // Replace many operand PackNodes with a binary tree for matching
3240       PackNode* p = (PackNode*) n;
3241       Node* btp = p->binary_tree_pack(1, n->req());
3242       n->subsume_by(btp, this);
3243     }
3244     break;
3245   case Op_Loop:
3246   case Op_CountedLoop:
3247     if (n->as_Loop()->is_inner_loop()) {
3248       frc.inc_inner_loop_count();
3249     }

3250     break;
3251   case Op_LShiftI:
3252   case Op_RShiftI:
3253   case Op_URShiftI:
3254   case Op_LShiftL:
3255   case Op_RShiftL:
3256   case Op_URShiftL:
3257     if (Matcher::need_masked_shift_count) {
3258       // The cpu's shift instructions don't restrict the count to the
3259       // lower 5/6 bits. We need to do the masking ourselves.
3260       Node* in2 = n->in(2);
3261       juint mask = (n->bottom_type() == TypeInt::INT) ? (BitsPerInt - 1) : (BitsPerLong - 1);
3262       const TypeInt* t = in2->find_int_type();
3263       if (t != NULL && t->is_con()) {
3264         juint shift = t->get_con();
3265         if (shift > mask) { // Unsigned cmp
3266           n->set_req(2, ConNode::make(TypeInt::make(shift & mask)));
3267         }
3268       } else {
3269         if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {




3230     break;
3231 
3232   case Op_PackB:
3233   case Op_PackS:
3234   case Op_PackI:
3235   case Op_PackF:
3236   case Op_PackL:
3237   case Op_PackD:
3238     if (n->req()-1 > 2) {
3239       // Replace many operand PackNodes with a binary tree for matching
3240       PackNode* p = (PackNode*) n;
3241       Node* btp = p->binary_tree_pack(1, n->req());
3242       n->subsume_by(btp, this);
3243     }
3244     break;
3245   case Op_Loop:
3246   case Op_CountedLoop:
3247     if (n->as_Loop()->is_inner_loop()) {
3248       frc.inc_inner_loop_count();
3249     }
3250     n->as_Loop()->verify_strip_mined(0);
3251     break;
3252   case Op_LShiftI:
3253   case Op_RShiftI:
3254   case Op_URShiftI:
3255   case Op_LShiftL:
3256   case Op_RShiftL:
3257   case Op_URShiftL:
3258     if (Matcher::need_masked_shift_count) {
3259       // The cpu's shift instructions don't restrict the count to the
3260       // lower 5/6 bits. We need to do the masking ourselves.
3261       Node* in2 = n->in(2);
3262       juint mask = (n->bottom_type() == TypeInt::INT) ? (BitsPerInt - 1) : (BitsPerLong - 1);
3263       const TypeInt* t = in2->find_int_type();
3264       if (t != NULL && t->is_con()) {
3265         juint shift = t->get_con();
3266         if (shift > mask) { // Unsigned cmp
3267           n->set_req(2, ConNode::make(TypeInt::make(shift & mask)));
3268         }
3269       } else {
3270         if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {


< prev index next >