Skip to content

Conversation

@rwestrel
Copy link
Contributor

@rwestrel rwestrel commented Mar 14, 2024

In IfNode::fold_compares_helper(), adjusted_val is:

(SubI (AddI top constant) 0)

which is then transformed to the top node. The code, next, tries to
destroy the adjusted_val node i.e. the top node. That results in
the assert failure. Given We're trying to fold 2 ifs in a dying part
of the graph, the fix is straightforward: test adjusted_val for top
and bail out from the transformation if that's the case.


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-8308660: C2 compilation hits 'node must be dead' assert (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18305

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 14, 2024

👋 Welcome back roland! 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
Copy link

openjdk bot commented Mar 14, 2024

@rwestrel 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:

8308660: C2 compilation hits 'node must be dead' assert

Reviewed-by: chagedorn, kvn

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 165 new commits pushed to the master branch:

  • 85fc47c: 8327180: Failed: java/io/ObjectStreamClass/ObjectStreamClassCaching.java#G1
  • 569b05a: 8327818: Implement Kerberos debug with sun.security.util.Debug
  • dec68d7: 8328234: Remove unused nativeUtils files
  • 7734466: 8325871: Move StringTable and SymbolTable rehashing calls
  • 9e98118: 8328177: Move LDFLAGS_JDK[LIB/EXE] to JdkNativeCompilation.gmk
  • f3af918: 8327945: Inline HasScavengableOops
  • fb390d2: 8327839: Crash with unboxing and widening primitive conversion in switch
  • 86f1744: 8328248: Convert javax/swing/JSlider/6587742/bug6587742.java applet test to main
  • 7baec66: 8328168: Epsilon: Premature OOM when allocating object larger than uncommitted heap size
  • c342188: 8328074: Add jcheck whitespace checking for assembly files
  • ... and 155 more: https://git.openjdk.org/jdk/compare/784f11c35d7f8646c7354c756ac8801a3d685874...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this 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
Copy link

openjdk bot commented Mar 14, 2024

@rwestrel 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 Mar 14, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 14, 2024
@mlbridge
Copy link

mlbridge bot commented Mar 14, 2024

Webrevs

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.

Otherwise, looks good!

Comment on lines 27 to 29
* @summary C2 compilation hits 'node must be dead' assert
* @run main/othervm -XX:-BackgroundCompilation -XX:-TieredCompilation -XX:-UseOnStackReplacement -XX:+StressIGVN -XX:StressSeed=242006623 TestFoldIfRemovesTopNode
* @run main/othervm -XX:-BackgroundCompilation -XX:-TieredCompilation -XX:-UseOnStackReplacement -XX:+StressIGVN TestFoldIfRemovesTopNode
Copy link
Member

Choose a reason for hiding this comment

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

You should add -XX:+UnlockDiagnosticVMOptions to run with product and either add an -XX:+IgnoreUnrecognizedVMOptions or @requires vm.compiler2.enabled since StressIGVN is a C2 flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, good catch! Fixed in the new commit.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 14, 2024
@rwestrel
Copy link
Contributor Author

Otherwise, looks good!

Thanks for reviewing this.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Good.

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.

Thanks for the update, looks good!

@rwestrel
Copy link
Contributor Author

Thanks for the reviews @chhagedorn @vnkozlov

@rwestrel
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Mar 15, 2024

Going to push as commit 91baac9b9de91b16e602dcf1d9f41e20bec38ffc.
Since your change was applied there have been 146 commits pushed to the master branch:

  • 71f9c4e: 8320534: fatal error for the NMTBenchmark test run for the mainline build
  • bfba489: 8328157: Move C[XX]FLAGS_JDK[LIB/EXE] to JdkNativeCompilation.gmk
  • 42aec8c: 8328146: Set LIBCXX automatically
  • 90ab52e: 8328166: Epsilon: 'EpsilonHeap::allocate_work' misuses the parameter 'size' as size in bytes
  • bf990c8: 8328269: NonFocusablePopupMenuTest.java should be marked as headful
  • 80b98c8: 8320503: Print warning if VM reaches MallocLimit during error reporting
  • dde519d: 8328066: WhiteBoxResizeTest failure on linux-x86: Could not reserve enough space for 2097152KB object heap
  • 80ccc98: 8328075: Shenandoah: Avoid forwarding when objects don't move in full-GC
  • 5249cc0: 8328087: Automate javax/swing/JTable/TAB/TAB.java applet test
  • c05f8c7: 8316388: Opensource five Swing component related regression tests
  • ... and 136 more: https://git.openjdk.org/jdk/compare/784f11c35d7f8646c7354c756ac8801a3d685874...master

Your commit was automatically rebased without conflicts.

@openjdk
Copy link

openjdk bot commented Mar 15, 2024

@rwestrel An unexpected error occurred during integration. No push attempt will be made. The error has been logged and will be investigated. It is possible that this error is caused by a transient issue; feel free to retry the operation.

private static void testHelper(int k, boolean flag, int[] array) {
if (flag) {
k = new int[k].length;
int j = k + 3;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
int j = k + 3;
int j = k + 3;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Will fix this before pushing.

@rwestrel
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Mar 19, 2024

Going to push as commit 053ff76.
Since your change was applied there have been 176 commits pushed to the master branch:

  • e1b0af2: 8323972: C2 compilation fails with assert(!x->as_Loop()->is_loop_nest_inner_loop()) failed: loop was transformed
  • c0fc956: 8328275: CodeCache::print_internals should not be called in PRODUCT code
  • 4ef591f: 8326964: Remove Eclipse Shared Workspaces
  • ac5b6cb: 8327757: Convert javax/swing/JSlider/6524424/bug6524424.java applet to main
  • 652fb3a: 8328154: Convert sun/java2d/loops/CopyAreaSpeed.java applet test to main
  • 9059727: 8327182: Move serverAlias into the loop
  • 2dd5fba: 8319889: Vector API tests trigger VM crashes with -XX:+StressIncrementalInlining
  • 3f2e849: 8280392: java/awt/Focus/NonFocusableWindowTest/NonfocusableOwnerTest.java failed with "RuntimeException: Test failed."
  • c901da4: 8327098: GTest needs larger combination limit
  • 9e32db2: 8328309: Remove malformed masked shift instruction selection patterns
  • ... and 166 more: https://git.openjdk.org/jdk/compare/784f11c35d7f8646c7354c756ac8801a3d685874...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 19, 2024

@rwestrel Pushed as commit 053ff76.

💡 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

Development

Successfully merging this pull request may close these issues.

4 participants