2882 // lower 5/6 bits. We need to do the masking ourselves.
2883 Node* in2 = n->in(2);
2884 juint mask = (n->bottom_type() == TypeInt::INT) ? (BitsPerInt - 1) : (BitsPerLong - 1);
2885 const TypeInt* t = in2->find_int_type();
2886 if (t != NULL && t->is_con()) {
2887 juint shift = t->get_con();
2888 if (shift > mask) { // Unsigned cmp
2889 n->set_req(2, ConNode::make(this, TypeInt::make(shift & mask)));
2890 }
2891 } else {
2892 if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
2893 Node* shift = new (this) AndINode(in2, ConNode::make(this, TypeInt::make(mask)));
2894 n->set_req(2, shift);
2895 }
2896 }
2897 if (in2->outcnt() == 0) { // Remove dead node
2898 in2->disconnect_inputs(NULL, this);
2899 }
2900 }
2901 break;
2902 default:
2903 assert( !n->is_Call(), "" );
2904 assert( !n->is_Mem(), "" );
2905 break;
2906 }
2907
2908 // Collect CFG split points
2909 if (n->is_MultiBranch())
2910 frc._tests.push(n);
2911 }
2912
2913 //------------------------------final_graph_reshaping_walk---------------------
2914 // Replacing Opaque nodes with their input in final_graph_reshaping_impl(),
2915 // requires that the walk visits a node's inputs before visiting the node.
2916 void Compile::final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &frc ) {
2917 ResourceArea *area = Thread::current()->resource_area();
2918 Unique_Node_List sfpt(area);
2919
2920 frc._visited.set(root->_idx); // first, mark node as visited
2921 uint cnt = root->req();
|
2882 // lower 5/6 bits. We need to do the masking ourselves.
2883 Node* in2 = n->in(2);
2884 juint mask = (n->bottom_type() == TypeInt::INT) ? (BitsPerInt - 1) : (BitsPerLong - 1);
2885 const TypeInt* t = in2->find_int_type();
2886 if (t != NULL && t->is_con()) {
2887 juint shift = t->get_con();
2888 if (shift > mask) { // Unsigned cmp
2889 n->set_req(2, ConNode::make(this, TypeInt::make(shift & mask)));
2890 }
2891 } else {
2892 if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
2893 Node* shift = new (this) AndINode(in2, ConNode::make(this, TypeInt::make(mask)));
2894 n->set_req(2, shift);
2895 }
2896 }
2897 if (in2->outcnt() == 0) { // Remove dead node
2898 in2->disconnect_inputs(NULL, this);
2899 }
2900 }
2901 break;
2902 case Op_MemBarStoreStore:
2903 // Break the link with AllocateNode: it is no longer useful and
2904 // confuses register allocation.
2905 if (n->req() > MemBarNode::Precedent) {
2906 n->set_req(MemBarNode::Precedent, top());
2907 }
2908 break;
2909 default:
2910 assert( !n->is_Call(), "" );
2911 assert( !n->is_Mem(), "" );
2912 break;
2913 }
2914
2915 // Collect CFG split points
2916 if (n->is_MultiBranch())
2917 frc._tests.push(n);
2918 }
2919
2920 //------------------------------final_graph_reshaping_walk---------------------
2921 // Replacing Opaque nodes with their input in final_graph_reshaping_impl(),
2922 // requires that the walk visits a node's inputs before visiting the node.
2923 void Compile::final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &frc ) {
2924 ResourceArea *area = Thread::current()->resource_area();
2925 Unique_Node_List sfpt(area);
2926
2927 frc._visited.set(root->_idx); // first, mark node as visited
2928 uint cnt = root->req();
|