Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8314191: C2 compilation fails with "bad AD file" #15551

Closed
wants to merge 5 commits into from

Conversation

merykitty
Copy link
Member

@merykitty merykitty commented Sep 2, 2023

Hi,

The root cause is that the comparison in the form x + inc <=> bound being transformed into x u<=> bound - min_value when inc is the min value of the loop type. The fix I propose is to avoid the transformation when either side is a counted loop increment.

Thanks a lot.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8314191: C2 compilation fails with "bad AD file" (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15551/head:pull/15551
$ git checkout pull/15551

Update a local copy of the PR:
$ git checkout pull/15551
$ git pull https://git.openjdk.org/jdk.git pull/15551/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15551

View PR using the GUI difftool:
$ git pr show -t 15551

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15551.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 2, 2023

👋 Welcome back qamai! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 2, 2023
@openjdk
Copy link

openjdk bot commented Sep 2, 2023

@merykitty The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Sep 2, 2023
@mlbridge
Copy link

mlbridge bot commented Sep 2, 2023

Webrevs

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks good to me otherwise.

* @bug 8314191
* @summary Loop increment should not be transformed into unsigned comparison
*
* @run main/othervm -Xcomp -XX:+TraceLoopOpts -XX:-TieredCompilation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TraceLoopOpts is a C2-only debug flag, the test needs a @requires vm.debug & vm.compiler2.enabled

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is TraceLoopOpts really required for the test?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your reviews. I think TraceLoopOpts is not really needed so I remove it, as a result we do not need requires clauses, too.

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks good to me!

* @bug 8314191
* @summary Loop increment should not be transformed into unsigned comparison
*
* @run main/othervm -Xcomp -XX:+TraceLoopOpts -XX:-TieredCompilation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is TraceLoopOpts really required for the test?

@openjdk
Copy link

openjdk bot commented Sep 4, 2023

@merykitty This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8314191: C2 compilation fails with "bad AD file"

Reviewed-by: thartmann, chagedorn

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 4, 2023
Copy link
Member

@TobiHartmann TobiHartmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@merykitty
Copy link
Member Author

@TobiHartmann @chhagedorn Thanks very much, I will integrate the patch

@merykitty
Copy link
Member Author

The failures in CI are due to JDK-8315696.
/integrate

@openjdk
Copy link

openjdk bot commented Sep 5, 2023

Going to push as commit 969fcdb.
Since your change was applied there have been 11 commits pushed to the master branch:

  • cef9fff: 8305507: Add support for grace period before AbortVMOnSafepointTimeout triggers
  • ed2b467: 8315499: build using devkit on Linux ppc64le RHEL puts path to devkit into libsplashscreen
  • 4b44575: 8305637: Remove Opaque1 nodes for Parse Predicates and clean up useless predicate elimination
  • 8647f00: 8293850: need a largest_committed metric for each category of NMT's output
  • 5a2e151: 8315548: G1: Document why VM_G1CollectForAllocation::doit() may allocate without completing a GC
  • 9013b03: 8315442: Enable parallelism in vmTestbase/nsk/monitoring/stress/thread tests
  • 744b397: 8312491: Update Classfile API snippets and examples
  • 69c9ec9: 8314094: java/lang/ProcessHandle/InfoTest.java fails on Windows when run as user with Administrator privileges
  • fe4f900: 8315088: C2: assert(wq.size() - before == EMPTY_LOOP_SIZE) failed: expect the EMPTY_LOOP_SIZE nodes of this body if empty
  • 8bbebbb: 8315644: increase timeout of sun/security/tools/jarsigner/Warning.java
  • ... and 1 more: https://git.openjdk.org/jdk/compare/9def4538ab5456d689fd289bdef66fd1655773bc...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 5, 2023
@openjdk openjdk bot closed this Sep 5, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 5, 2023
@openjdk
Copy link

openjdk bot commented Sep 5, 2023

@merykitty Pushed as commit 969fcdb.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
3 participants