8309268: C2: "assert(in_bb(n)) failed: must be" after JDK-8306302#14268
8309268: C2: "assert(in_bb(n)) failed: must be" after JDK-8306302#14268eme64 wants to merge 2 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back epeter! A progress list of the required criteria for merging this PR into |
Webrevs
|
robcasloz
left a comment
There was a problem hiding this comment.
Looks good, I just have a few minor suggestions.
src/hotspot/share/opto/superword.cpp
Outdated
There was a problem hiding this comment.
Could you turn this comment into an assertion?
There was a problem hiding this comment.
| // Use some constaints in the comparison | |
| // Use some constants in the comparison |
| for (int i = 0; i < SIZE; i++) { | ||
| Asserts.assertEquals(rD[i], cmoveDGTforD(aD[i], bD[i], cD[i], dD[i])); | ||
| } | ||
|
|
There was a problem hiding this comment.
Nit: remove one of the empty lines.
There was a problem hiding this comment.
Please add an Oracle copyright entry to the header of this file, see e.g.
|
@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 63 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 |
robcasloz
left a comment
There was a problem hiding this comment.
Thanks for addressing my suggestions, looks good!
|
Thanks @robcasloz for the review and suggestions! |
|
Going to push as commit 22a9a86.
Your commit was automatically rebased without conflicts. |
This is the fix to a regression caused in the CMoveV fix JDK-8306302.
I had implicitly assumed that all
Cmpin the loop also have theirin(1)inside the loop (in_bb). This is not always true, and hence we hit the assert.Solution
However, we know that at least one of the two inputs of a
Cmpmust also be in the loop, else theCmpwould float outside the loop. So ifin(1)is not in the loop then we can just pickin(2)for thevelt_type.Testing
I added 2 regression tests that were provided in the bug, and also extended
TestVectorConditionalMove.java(though it is currently problemlisted because of an IR framework bug). This extension also triggered the assert, and now properly vectorizes.I tested up to tier6 and stress testing. I ran the tests both with
TestVectorConditionalMoveproblemlisted and without the problemlisting.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14268/head:pull/14268$ git checkout pull/14268Update a local copy of the PR:
$ git checkout pull/14268$ git pull https://git.openjdk.org/jdk.git pull/14268/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14268View PR using the GUI difftool:
$ git pr show -t 14268Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14268.diff
Webrev
Link to Webrev Comment