Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8290964: C2 compilation fails with assert "non-reduction loop contain…
…s reduction nodes"

Reviewed-by: thartmann, chagedorn
  • Loading branch information
robcasloz committed Oct 5, 2022
1 parent b4e74ae commit 4bdd1c9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
11 changes: 0 additions & 11 deletions src/hotspot/share/opto/loopnode.cpp
Expand Up @@ -3901,17 +3901,6 @@ uint IdealLoopTree::est_loop_flow_merge_sz() const {
return 0;
}

#ifdef ASSERT
bool IdealLoopTree::has_reduction_nodes() const {
for (uint i = 0; i < _body.size(); i++) {
if (_body[i]->is_reduction()) {
return true;
}
}
return false;
}
#endif // ASSERT

#ifndef PRODUCT
//------------------------------dump_head--------------------------------------
// Dump 1 liner for loop header info
Expand Down
5 changes: 0 additions & 5 deletions src/hotspot/share/opto/loopnode.hpp
Expand Up @@ -778,11 +778,6 @@ class IdealLoopTree : public ResourceObj {

void remove_main_post_loops(CountedLoopNode *cl, PhaseIdealLoop *phase);

#ifdef ASSERT
// Tell whether the body contains nodes marked as reductions.
bool has_reduction_nodes() const;
#endif // ASSERT

#ifndef PRODUCT
void dump_head() const; // Dump loop head only
void dump() const; // Dump this loop recursively
Expand Down
5 changes: 0 additions & 5 deletions src/hotspot/share/opto/superword.cpp
Expand Up @@ -2453,11 +2453,6 @@ bool SuperWord::output() {
return false;
}

// Check that the loop to be vectorized does not have inconsistent reduction
// information, which would likely lead to a miscompilation.
assert(!lpt()->has_reduction_nodes() || cl->is_reduction_loop(),
"non-reduction loop contains reduction nodes");

#ifndef PRODUCT
if (TraceLoopOpts) {
tty->print("SuperWord::output ");
Expand Down

5 comments on commit 4bdd1c9

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on 4bdd1c9 Dec 30, 2022

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 4bdd1c9 Dec 30, 2022

Choose a reason for hiding this comment

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

@GoeLin the backport was successfully created on the branch GoeLin-backport-4bdd1c91 in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

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

The commit being backported was authored by Roberto Castañeda Lozano on 5 Oct 2022 and was reviewed by Tobias Hartmann and Christian Hagedorn.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-4bdd1c91:GoeLin-backport-4bdd1c91
$ git checkout GoeLin-backport-4bdd1c91
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-4bdd1c91

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on 4bdd1c9 Jan 3, 2023

Choose a reason for hiding this comment

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

/backport jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 4bdd1c9 Jan 3, 2023

Choose a reason for hiding this comment

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

@GoeLin the backport was successfully created on the branch GoeLin-backport-4bdd1c91 in my personal fork of openjdk/jdk11u-dev. To create a pull request with this backport targeting openjdk/jdk11u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

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

The commit being backported was authored by Roberto Castañeda Lozano on 5 Oct 2022 and was reviewed by Tobias Hartmann and Christian Hagedorn.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk11u-dev:

$ git fetch https://github.com/openjdk-bots/jdk11u-dev GoeLin-backport-4bdd1c91:GoeLin-backport-4bdd1c91
$ git checkout GoeLin-backport-4bdd1c91
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk11u-dev GoeLin-backport-4bdd1c91

Please sign in to comment.