comparison src/share/vm/opto/loopPredicate.cpp @ 3840:4e761e7e6e12

7070134: Hotspot crashes with sigsegv from PorterStemmer Summary: Do not move data nodes which are attached to a predicate test to a dominating test. Reviewed-by: never
author kvn
date Tue, 26 Jul 2011 19:35:23 -0700
parents bad7ecd0b6ed
children c96c3eb1efae
comparison
equal deleted inserted replaced
3839:3d42f82cd811 3840:4e761e7e6e12
815 CountedLoopNode *cl = NULL; 815 CountedLoopNode *cl = NULL;
816 if (head->is_CountedLoop()) { 816 if (head->is_CountedLoop()) {
817 cl = head->as_CountedLoop(); 817 cl = head->as_CountedLoop();
818 // do nothing for iteration-splitted loops 818 // do nothing for iteration-splitted loops
819 if (!cl->is_normal_loop()) return false; 819 if (!cl->is_normal_loop()) return false;
820 // Avoid RCE if Counted loop's test is '!='.
821 BoolTest::mask bt = cl->loopexit()->test_trip();
822 if (bt != BoolTest::lt && bt != BoolTest::gt)
823 cl = NULL;
820 } 824 }
821 825
822 Node* entry = head->in(LoopNode::EntryControl); 826 Node* entry = head->in(LoopNode::EntryControl);
823 ProjNode *predicate_proj = NULL; 827 ProjNode *predicate_proj = NULL;
824 // Loop limit check predicate should be near the loop. 828 // Loop limit check predicate should be near the loop.
956 _igvn.hash_delete(lower_bound_iff); 960 _igvn.hash_delete(lower_bound_iff);
957 lower_bound_iff->set_req(1, lower_bound_bol); 961 lower_bound_iff->set_req(1, lower_bound_bol);
958 if (TraceLoopPredicate) tty->print_cr("lower bound check if: %d", lower_bound_iff->_idx); 962 if (TraceLoopPredicate) tty->print_cr("lower bound check if: %d", lower_bound_iff->_idx);
959 963
960 // Test the upper bound 964 // Test the upper bound
961 Node* upper_bound_bol = rc_predicate(loop, ctrl, scale, offset, init, limit, stride, rng, true); 965 Node* upper_bound_bol = rc_predicate(loop, lower_bound_proj, scale, offset, init, limit, stride, rng, true);
962 IfNode* upper_bound_iff = upper_bound_proj->in(0)->as_If(); 966 IfNode* upper_bound_iff = upper_bound_proj->in(0)->as_If();
963 _igvn.hash_delete(upper_bound_iff); 967 _igvn.hash_delete(upper_bound_iff);
964 upper_bound_iff->set_req(1, upper_bound_bol); 968 upper_bound_iff->set_req(1, upper_bound_bol);
965 if (TraceLoopPredicate) tty->print_cr("upper bound check if: %d", lower_bound_iff->_idx); 969 if (TraceLoopPredicate) tty->print_cr("upper bound check if: %d", lower_bound_iff->_idx);
966 970