mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
7110586: C2 generates incorrect results
Exact limit of empty loop calculated incorrectly. Reviewed-by: iveresov, never
This commit is contained in:
parent
3de3451b3a
commit
157ba53d27
2 changed files with 132 additions and 1 deletions
|
@ -715,7 +715,6 @@ Node* PhaseIdealLoop::exact_limit( IdealLoopTree *loop ) {
|
|||
long limit_con = cl->limit()->get_int();
|
||||
julong trip_cnt = cl->trip_count();
|
||||
long final_con = init_con + trip_cnt*stride_con;
|
||||
final_con -= stride_con;
|
||||
int final_int = (int)final_con;
|
||||
// The final value should be in integer range since the loop
|
||||
// is counted and the limit was checked for overflow.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue