2542 case Op_CountedLoop: |
2542 case Op_CountedLoop: |
2543 if (n->as_Loop()->is_inner_loop()) { |
2543 if (n->as_Loop()->is_inner_loop()) { |
2544 frc.inc_inner_loop_count(); |
2544 frc.inc_inner_loop_count(); |
2545 } |
2545 } |
2546 break; |
2546 break; |
|
2547 case Op_LShiftI: |
|
2548 case Op_RShiftI: |
|
2549 case Op_URShiftI: |
|
2550 case Op_LShiftL: |
|
2551 case Op_RShiftL: |
|
2552 case Op_URShiftL: |
|
2553 if (Matcher::need_masked_shift_count) { |
|
2554 // The cpu's shift instructions don't restrict the count to the |
|
2555 // lower 5/6 bits. We need to do the masking ourselves. |
|
2556 Node* in2 = n->in(2); |
|
2557 juint mask = (n->bottom_type() == TypeInt::INT) ? (BitsPerInt - 1) : (BitsPerLong - 1); |
|
2558 const TypeInt* t = in2->find_int_type(); |
|
2559 if (t != NULL && t->is_con()) { |
|
2560 juint shift = t->get_con(); |
|
2561 if (shift > mask) { // Unsigned cmp |
|
2562 Compile* C = Compile::current(); |
|
2563 n->set_req(2, ConNode::make(C, TypeInt::make(shift & mask))); |
|
2564 } |
|
2565 } else { |
|
2566 if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) { |
|
2567 Compile* C = Compile::current(); |
|
2568 Node* shift = new (C, 3) AndINode(in2, ConNode::make(C, TypeInt::make(mask))); |
|
2569 n->set_req(2, shift); |
|
2570 } |
|
2571 } |
|
2572 if (in2->outcnt() == 0) { // Remove dead node |
|
2573 in2->disconnect_inputs(NULL); |
|
2574 } |
|
2575 } |
|
2576 break; |
2547 default: |
2577 default: |
2548 assert( !n->is_Call(), "" ); |
2578 assert( !n->is_Call(), "" ); |
2549 assert( !n->is_Mem(), "" ); |
2579 assert( !n->is_Mem(), "" ); |
2550 break; |
2580 break; |
2551 } |
2581 } |