-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
JDK-8325037: x86: enable and fix hotspot/jtreg/compiler/vectorization/TestRoundVectFloat.java #17649
Conversation
👋 Welcome back mli! A progress list of the required criteria for merging this PR into |
@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. |
@@ -1,5 +1,5 @@ | |||
/* | |||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. | |||
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. |
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.
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. | |
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. |
"-XX:CompileThresholdScaling=0.3"); | ||
System.out.println("PASSED"); | ||
} | ||
|
||
@Test | ||
@IR(applyIf = {"UseAVX", " > 1"}, counts = {"RoundVF" , " > 0 "}) | ||
@IR(applyIf = {"UseAVX", " > 1"}, counts = {IRNode.ROUND_VF , " > 0 "}) |
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.
Isn't that node only available if UseAVX >= 2
?
jdk/src/hotspot/cpu/x86/x86.ad
Lines 1501 to 1504 in f0bae79
case Op_RoundVF: | |
if (UseAVX < 2) { // enabled for AVX2 only | |
return false; | |
} |
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.
Sorry, misread the code. Looks good.
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.
FTR, backend implementation of rounding first adds a broadcasted 0.5 value to incoming floating point vector lanes, register only flavor of broadcast operation is only supported by AVX2 targets. We can broadcast 0.5 into constant table emitted prior to method body to lift this limitation. Another concern is around different max vector size for floating point and integral vectors on AVX1 targets, 256 bit float vector vs 128 bit integral vector. Thus, a sharper check in match_rule_supported_vector (size_in_bits > 128 && UseAVX < 2) should be added to support this for AVX1 targets as we are emitting an integral compare in special case handling for NaN and -/+0.0 / Inf.
But, this can be taken up separately, if need be, current fix for PR looks ok to me.
I'll run this through our testing and report back once it passed. |
@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 41 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.
Good.
Thanks for testing, I'll wait for your feedback. |
@TobiHartmann @vnkozlov @jatin-bhateja Thanks for your revewiing! /integrate |
Going to push as commit ed06846.
Your commit was automatically rebased without conflicts. |
@Hamlin-Li Pushed as commit ed06846. 💡 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 simple patch to fix test TestRoundVectFloat.java?
Thanks!
FYI: This test is not actually tested, need to fix the test applying filter and IR matching rule.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17649/head:pull/17649
$ git checkout pull/17649
Update a local copy of the PR:
$ git checkout pull/17649
$ git pull https://git.openjdk.org/jdk.git pull/17649/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 17649
View PR using the GUI difftool:
$ git pr show -t 17649
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17649.diff
Webrev
Link to Webrev Comment