-
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
8353665: RISC-V: IR verification fails in TestSubNodeFloatDoubleNegation.java #24421
8353665: RISC-V: IR verification fails in TestSubNodeFloatDoubleNegation.java #24421
Conversation
👋 Welcome back mli! A progress list of the required criteria for merging this PR into |
@Hamlin-Li 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 74 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 |
@Hamlin-Li The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
Where does the extra SubF come from? |
@@ -55,7 +55,8 @@ public static void assertResults() { | |||
@Test | |||
// Match a generic SubNode, because scalar Float16 operations are often | |||
// performed as float operations. | |||
@IR(counts = { IRNode.SUB, "2" }) | |||
@IR(counts = { IRNode.SUB, "2" }, applyIfPlatform = {"riscv64", "false"}) | |||
@IR(counts = { IRNode.SUB, ">= 2" }, applyIfPlatform = {"riscv64", "true"}) |
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 it perhaps make sense to fix the number of SubNode
s or does the Float16
code add a bunch of them on RISC-V?
Thanks for having a look, interesting! Please check the B5 block (which is when TLAB run out I think), there is an extra I checked the x86, find out I don't have the CPU feature to generate real float16 instructions, so it only has 2 SubF rather than SubHF which I think is expected for Float16. Also not sure if this useless |
To me One option I see would be to match two |
Ah, I just checked on riscv, if I disable float16(zfh) it will not generate the extra |
R7 should be tlab_end of the thread. |
@jatin-bhateja Could you please help to run the test with |
I ran the test with software emulation of
The ideal graph shows the same "alternative codepath" that your opto assembly shows. I guess we need to generally predicate the test on native float16 support. But I can do that in a separate issue, where I also investigate ARM. |
Seems to me the |
Filed JDK-8353730. I will first fix the test and then investigate the additional |
Great! |
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, with or without my suggestion.
Thank you for catching and fixing this!
test/hotspot/jtreg/compiler/floatingpoint/TestSubNodeFloatDoubleNegation.java
Outdated
Show resolved
Hide resolved
…leNegation.java Co-authored-by: Manuel Hässig <manuel.hassig@oracle.com>
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 too.
Thanks for your reviews @mhaessig @TobiHartmann @luhenry ! |
/integrate |
Going to push as commit 21db0fd.
Your commit was automatically rebased without conflicts. |
@Hamlin-Li Pushed as commit 21db0fd. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi,
Can you help to review this patch?
The newly added TestSubNodeFloatDoubleNegation.java (in #24150) is to check
0 - (0 - x)
is not folded tox
for float and double.I have manually checked the IR and generated assembly code, it's not folded on riscv either, just there is an extra SubF in some code path.
So, the fix for this test on riscv should be simply make the check as
>= 2
rather than2
.Tested on both x86 and riscv64.
Thanks
Progress
Issue
Reviewers
Reviewers without OpenJDK IDs
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24421/head:pull/24421
$ git checkout pull/24421
Update a local copy of the PR:
$ git checkout pull/24421
$ git pull https://git.openjdk.org/jdk.git pull/24421/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24421
View PR using the GUI difftool:
$ git pr show -t 24421
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24421.diff
Using Webrev
Link to Webrev Comment