-
Notifications
You must be signed in to change notification settings - Fork 110
8336003: [lworld] TestLWorld::test151 triggers "Should have been buffered" assert #1489
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
base: lworld
Are you sure you want to change the base?
Conversation
562a16f
to
422301b
Compare
👋 Welcome back qamai! A progress list of the required criteria for merging this PR into |
@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:
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 8 new commits pushed to the
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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@TobiHartmann) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
@merykitty Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this Quan-Anh!
compiler/c2/TestDeadLoopSplitIfLoop.java
now fails with -XX:-EnableValhalla
:
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/open/src/hotspot/share/opto/phaseX.cpp:784), pid=1729076, tid=1729093
# assert(no_dead_loop) failed: dead loop detected
#
# JRE version: Java(TM) SE Runtime Environment (25.0) (fastdebug build 25-lworld5ea-LTS-2025-06-16-1157190.tobias.hartmann.valhalla2)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-lworld5ea-LTS-2025-06-16-1157190.tobias.hartmann.valhalla2, compiled mode, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x184ec45] PhaseGVN::dead_loop_check(Node*) [clone .part.0]+0x1d5
Current CompileTask:
C2:309 14 b compiler.c2.TestDeadLoopSplitIfLoop::test (88 bytes)
Stack: [0x00007f1323dff000,0x00007f1323eff000], sp=0x00007f1323efa0e0, free space=1004k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x184ec45] PhaseGVN::dead_loop_check(Node*) [clone .part.0]+0x1d5 (phaseX.cpp:784)
V [libjvm.so+0x185fe39] PhaseIterGVN::transform_old(Node*)+0x529 (phaseX.cpp:767)
V [libjvm.so+0x1854c54] PhaseIterGVN::optimize()+0xb4 (phaseX.cpp:1054)
V [libjvm.so+0xb54796] Compile::Optimize()+0x326 (compile.cpp:2779)
V [libjvm.so+0xb583bf] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1fef (compile.cpp:874)
V [libjvm.so+0x96de34] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x484 (c2compiler.cpp:142)
V [libjvm.so+0xb66078] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xb58 (compileBroker.cpp:2307)
V [libjvm.so+0xb67238] CompileBroker::compiler_thread_loop()+0x568 (compileBroker.cpp:1951)
V [libjvm.so+0x10e17fb] JavaThread::thread_main_inner()+0x13b (javaThread.cpp:774)
V [libjvm.so+0x1b5b146] Thread::call_run()+0xb6 (thread.cpp:231)
V [libjvm.so+0x17c6e38] thread_native_entry(Thread*)+0x128 (os_linux.cpp:875)
src/hotspot/share/opto/cfgnode.cpp
Outdated
|
||
Node* phi_in = current->in(i); | ||
if (phi_in->is_Phi()) { | ||
visited.append_if_missing(phi_in->as_Phi()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would a Unique_Node_List
be more appropriate here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unique_Node_List
cannot work with const Node*
so GrowableArray
is the only option here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: Changed it to a Unique_Node_List
.
Thanks for your testing, the failure is due to the fact that when traversing the |
There was a problem hiding this 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!
Hi,
The issue here is that the IGVN cannot deduce that the
IsBuffered
input is a constant 1. This is because after theInlineTypeNode
is pushed down through aPhi
cluster, theIsBuffered
input is aPhi
cluster with loop phis, which makes it difficult for the IGVN to see through. A solution is to do another round of CCP after loop opts, but it is rather a big hammer. In this PR, I propose to make it possible for aPhiNode
to look through itsPhi
inputs to discover the unique non-phi input of aPhi
cluster. The test still fails but it seems more like an expected behaviour rather than an issue this time, I have modified the test a little bit for it to pass.Please take a look and share your thoughts, thanks very much.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/1489/head:pull/1489
$ git checkout pull/1489
Update a local copy of the PR:
$ git checkout pull/1489
$ git pull https://git.openjdk.org/valhalla.git pull/1489/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1489
View PR using the GUI difftool:
$ git pr show -t 1489
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1489.diff
Using Webrev
Link to Webrev Comment