Skip to content

Commit

Permalink
8341831: PhaseCFG::insert_anti_dependences asserts with "no loads"
Browse files Browse the repository at this point in the history
Reviewed-by: dlong, kvn
  • Loading branch information
Igor Veresov committed Oct 14, 2024
1 parent 9e262df commit a8a8b2d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 11 additions & 1 deletion src/hotspot/share/opto/gcm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,17 @@ Block* PhaseCFG::insert_anti_dependences(Block* LCA, Node* load, bool verify) {
worklist_def_use_mem_states.pop();

uint op = use_mem_state->Opcode();
assert(!use_mem_state->needs_anti_dependence_check(), "no loads");

#ifdef ASSERT
// CacheWB nodes are peculiar in a sense that they both are anti-dependent and produce memory.
// Allow them to be treated as a store.
bool is_cache_wb = false;
if (use_mem_state->is_Mach()) {
int ideal_op = use_mem_state->as_Mach()->ideal_Opcode();
is_cache_wb = (ideal_op == Op_CacheWB);
}
assert(!use_mem_state->needs_anti_dependence_check() || is_cache_wb, "no loads");
#endif

// MergeMems do not directly have anti-deps.
// Treat them as internal nodes in a forward tree of memory states,
Expand Down
2 changes: 0 additions & 2 deletions test/hotspot/jtreg/ProblemList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@

# :hotspot_compiler

applications/ctw/modules/java_base_2.java 8341831 linux-x64

compiler/ciReplay/TestSAServer.java 8029528 generic-all
compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java 8225370 generic-all

Expand Down

3 comments on commit a8a8b2d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@veresov
Copy link
Contributor

Choose a reason for hiding this comment

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

/backport jdk23u

@openjdk
Copy link

@openjdk openjdk bot commented on a8a8b2d Oct 15, 2024

Choose a reason for hiding this comment

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

@veresov Could not automatically backport a8a8b2de to openjdk/jdk23u due to conflicts in the following files:

  • src/hotspot/share/opto/gcm.cpp

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk23u. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk23u.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-veresov-a8a8b2de-master

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git a8a8b2deba854ac105ed760c09e65701c4d0f6fc

# Backport the commit
$ git cherry-pick --no-commit a8a8b2deba854ac105ed760c09e65701c4d0f6fc
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport a8a8b2deba854ac105ed760c09e65701c4d0f6fc'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk23u with the title Backport a8a8b2deba854ac105ed760c09e65701c4d0f6fc.

Below you can find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit a8a8b2de from the openjdk/jdk repository.

The commit being backported was authored by Igor Veresov on 14 Oct 2024 and was reviewed by Dean Long and Vladimir Kozlov.

Thanks!

Please sign in to comment.