mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-16 17:14:41 +02:00
7052494: Eclipse test fails on JDK 7 b142
Keep 'ne' test in Counted loop when we can't guarantee during compilation that init < limit. Reviewed-by: never
This commit is contained in:
parent
5d2e4e676b
commit
d19a8f6e35
3 changed files with 172 additions and 3 deletions
|
@ -83,7 +83,7 @@ void IdealLoopTree::compute_exact_trip_count( PhaseIdealLoop *phase ) {
|
|||
#ifdef ASSERT
|
||||
BoolTest::mask bt = cl->loopexit()->test_trip();
|
||||
assert(bt == BoolTest::lt || bt == BoolTest::gt ||
|
||||
(bt == BoolTest::ne && !LoopLimitCheck), "canonical test is expected");
|
||||
bt == BoolTest::ne, "canonical test is expected");
|
||||
#endif
|
||||
|
||||
Node* init_n = cl->init_trip();
|
||||
|
@ -1070,9 +1070,11 @@ void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_
|
|||
// direction:
|
||||
// positive stride use <
|
||||
// negative stride use >
|
||||
//
|
||||
// not-equal test is kept for post loop to handle case
|
||||
// when init > limit when stride > 0 (and reverse).
|
||||
|
||||
if (pre_end->in(CountedLoopEndNode::TestValue)->as_Bool()->_test._test == BoolTest::ne) {
|
||||
assert(!LoopLimitCheck, "only canonical tests (lt or gt) are expected");
|
||||
|
||||
BoolTest::mask new_test = (main_end->stride_con() > 0) ? BoolTest::lt : BoolTest::gt;
|
||||
// Modify pre loop end condition
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue