Skip to content

8265154: vinserti128 operand mix up for KNL platforms #3480

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

Closed
wants to merge 1 commit into from

Conversation

sviswa7
Copy link

@sviswa7 sviswa7 commented Apr 14, 2021

There is a bug in macro assembler in vinserti128 special handling for platforms like KNL that do not support AVX512VL.

The following:
void vinserti128(XMMRegister dst, XMMRegister nds, XMMRegister src, uint8_t imm8) {
if (UseAVX > 2 && VM_Version::supports_avx512novl()) {
Assembler::vinserti32x4(dst, dst, src, imm8);
}
...
}

Should have been:
void vinserti128(XMMRegister dst, XMMRegister nds, XMMRegister src, uint8_t imm8) {
if (UseAVX > 2 && VM_Version::supports_avx512novl()) {
Assembler::vinserti32x4(dst, nds, src, imm8);
}
...
}

Best Regards,
Sandhya


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8265154: vinserti128 operand mix up for KNL platforms

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3480/head:pull/3480
$ git checkout pull/3480

Update a local copy of the PR:
$ git checkout pull/3480
$ git pull https://git.openjdk.java.net/jdk pull/3480/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3480

View PR using the GUI difftool:
$ git pr show -t 3480

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3480.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 14, 2021

👋 Welcome back sviswanathan! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Apr 14, 2021

@sviswa7 The following label will be automatically applied to this pull request:

  • hotspot

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.

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Apr 14, 2021
@sviswa7
Copy link
Author

sviswa7 commented Apr 14, 2021

/label add hotspot-compiler

@sviswa7
Copy link
Author

sviswa7 commented Apr 14, 2021

/label remove hotspot

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Apr 14, 2021
@openjdk
Copy link

openjdk bot commented Apr 14, 2021

@sviswa7
The hotspot-compiler label was successfully added.

@openjdk openjdk bot removed the hotspot hotspot-dev@openjdk.org label Apr 14, 2021
@openjdk
Copy link

openjdk bot commented Apr 14, 2021

@sviswa7
The hotspot label was successfully removed.

@sviswa7 sviswa7 marked this pull request as ready for review April 14, 2021 05:02
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 14, 2021
@mlbridge
Copy link

mlbridge bot commented Apr 14, 2021

Webrevs

Copy link
Member

@TobiHartmann TobiHartmann left a 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. Just wondering, why did this never show up? Are we missing tests exercising this code path?

@openjdk
Copy link

openjdk bot commented Apr 14, 2021

@sviswa7 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:

8265154: vinserti128 operand mix up for KNL platforms

Reviewed-by: thartmann, kvn

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 73 new commits pushed to the master branch:

  • 888d80b: 8265358: ProblemList jdk/jshell/ToolBasicTest.java on macOS-aarch64
  • 0bdc3e7: 8262744: Formatter '%g' conversion uses wrong format for BigDecimal rounding up to limits
  • 4413dbf: 8263395: Incorrect use of Objects.nonNull
  • 74d03ab: 8039270: The background color of the button can't be displayed and when pressed the button, the background color can not be changed in accordance with the case described.
  • 7c37c02: 8244190: JFR: When starting a JVM with -XX:StartFlightRecording, output is written to stdout
  • 79adc16: 8264152: javax/net/ssl/DTLS/RespondToRetransmit.java timed out
  • 1c3fd46: 8265175: (fs) Files.copy(Path,Path,CopyOption...) should use sendfile on Linux
  • cee4f1d: 8203925: tools/javac/importscope/T8193717.java ran out of java heap
  • 694e1cd: 8262060: compiler/whitebox/BlockingCompilation.java timed out
  • 6946d91: 8075915: The eight controls without black backgrounds with WinLAF & GTK LAF & Nimbus LAF
  • ... and 63 more: https://git.openjdk.java.net/jdk/compare/8df8512bc805645f4c6593ceff3369193ebb97c8...master

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 14, 2021
Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

What problems this is causing? Would be nice to have a test to show the issue (if possible).

@sviswa7
Copy link
Author

sviswa7 commented Apr 16, 2021

@vnkozlov @TobiHartmann Thanks a lot for the review.
I noticed this bug while running the vector api tests on KNL platform.
The specific tests that are failing without this fix are:
jdk/incubator/vector/Float256VectorTests.java (withFloat256VectorTests)
jdk/incubator/vector/Double256VectorTests.java (withDouble256VectorTests)

Majority of the places where vinserti128 is used in code gen, the dst and nds are passed as same register. Only in the implementation of VectorInsert node for vector api, the dst and nds are different.

The vector api tests are run as part of tier 3.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Good.

So it was caught by existing tests.

@sviswa7
Copy link
Author

sviswa7 commented Apr 16, 2021

Thanks @vnkozlov. Yes, it was caught by existing tests.

@sviswa7
Copy link
Author

sviswa7 commented Apr 16, 2021

/integrate

@openjdk openjdk bot closed this Apr 16, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 16, 2021
@openjdk
Copy link

openjdk bot commented Apr 16, 2021

@sviswa7 Since your change was applied there have been 74 commits pushed to the master branch:

  • 2c4075c: 8265381: ProblemList runtime/logging/RedefineClasses.java on macos-x64 -Xcomp
  • 888d80b: 8265358: ProblemList jdk/jshell/ToolBasicTest.java on macOS-aarch64
  • 0bdc3e7: 8262744: Formatter '%g' conversion uses wrong format for BigDecimal rounding up to limits
  • 4413dbf: 8263395: Incorrect use of Objects.nonNull
  • 74d03ab: 8039270: The background color of the button can't be displayed and when pressed the button, the background color can not be changed in accordance with the case described.
  • 7c37c02: 8244190: JFR: When starting a JVM with -XX:StartFlightRecording, output is written to stdout
  • 79adc16: 8264152: javax/net/ssl/DTLS/RespondToRetransmit.java timed out
  • 1c3fd46: 8265175: (fs) Files.copy(Path,Path,CopyOption...) should use sendfile on Linux
  • cee4f1d: 8203925: tools/javac/importscope/T8193717.java ran out of java heap
  • 694e1cd: 8262060: compiler/whitebox/BlockingCompilation.java timed out
  • ... and 64 more: https://git.openjdk.java.net/jdk/compare/8df8512bc805645f4c6593ceff3369193ebb97c8...master

Your commit was automatically rebased without conflicts.

Pushed as commit c108e7a.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@sviswa7 sviswa7 deleted the inserti branch June 1, 2022 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants