-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8310130: C2: assert(false) failed: scalar_input is neither phi nor a matchin reduction #14494
Conversation
…matchin reduction
👋 Welcome back epeter! A progress list of the required criteria for merging this PR into |
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.
Looks fine.
@eme64 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 165 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. ➡️ To integrate this PR with the above commit message to 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!
TestFramework.runWithFlags("-Xbatch", "-XX:-TieredCompilation", | ||
"-XX:CompileCommand=compileonly,compiler.loopopts.superword.TestUnorderedReductionPartialVectorization::test*"); |
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.
It should probably also trigger without the flags by just specifying TestFramework.run()
as test1()
is not using other methods and the IR framework will implicitly use -Xbatch
and wait for the compilation of test1()
to be finished.
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.
@chhagedorn I was able to remove them, thanks for the catch!
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.
Nice!
Just saw a x86 (32bit) IR rule failure for |
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 is good
Thanks @vnkozlov @chhagedorn for the reviews! |
Going to push as commit 526dba1.
Your commit was automatically rebased without conflicts. |
Removed a spurious assert before optimization bailout.
I assumed that the "scalar input" of a Reduction node must always be either a Phi or another Reduction node. But that is incorrect, partial vectorization can lead to a reduction node chain where we have vector reductions and scalar reductions at the same time. In those cases, we cannot move the UnorderedReductions out of the loop, so a optimization bailout is appropriate.
I assessed the other asserts in
PhaseIdealLoop::move_unordered_reduction_out_of_loop
, and I think they are all justified. However, one assert would have lead to acontinue
in production, which would not break out of the nested loop correctly. I changed it to areturn
, so that would be a bailout from the optimization. This assert should not be triggered because inSuperWord::mark_reductions
we forbid that a reduction node has any uses inside the loop except for the successor node in the reduction chain.I have one regression test delivered by the fuzzer, and one that I constructed myself after understanding the issue.
Testing up to tier6 and stress testing.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14494/head:pull/14494
$ git checkout pull/14494
Update a local copy of the PR:
$ git checkout pull/14494
$ git pull https://git.openjdk.org/jdk.git pull/14494/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14494
View PR using the GUI difftool:
$ git pr show -t 14494
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14494.diff
Webrev
Link to Webrev Comment