8278790: Inner loop of long loop nest runs for too few iterations #35
Conversation
|
Webrevs
|
@rwestrel This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 7 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the
|
@chhagedorn @neliasso thanks for the reviews. |
/integrate |
Going to push as commit bb7efb3.
Your commit was automatically rebased without conflicts. |
Given a counted loop that iterates in [A, Z), when long range checks
are transformed into int range checks, a loop nest is created and
the inner loop iterates in [0, Z2).
The limits of the inner loop are adjusted to guarantee no overflow for
the range of values of the inner loop. That is for a range check:
i * scale + offset <u length
max_jint/scale).
Also, we don't want to loose what we know about the bounds of the loop
being transformed.
The bug here is that 2) is performed before 1). This was spotted with
a micro benchmarks where the initial loop had only ~2000
iterations. The transformed loop is expected to run for the same 2000
iterations but instead ran for 2000/scale iterations.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk18 pull/35/head:pull/35
$ git checkout pull/35
Update a local copy of the PR:
$ git checkout pull/35
$ git pull https://git.openjdk.java.net/jdk18 pull/35/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 35
View PR using the GUI difftool:
$ git pr show -t 35
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk18/pull/35.diff