Skip to content
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

8293695: Implement isInfinite intrinsic for RISC-V #10253

Closed
wants to merge 1 commit into from

Conversation

voitylov
Copy link

@voitylov voitylov commented Sep 13, 2022

RISC-V 64 intrinsic for isInfinite follows the logic of x86 intrinsic (introduced by 8285868). This patch adds C2 match for IsInfinite nodes. Existing test is modified to run on RISC-V and passes on both release and fastdebug builds. Benchmark results are below:

before:
Benchmark Mode Cnt Score Error Units
DoubleClassCheck.testIsInfiniteBranch avgt 15 43.547 ± 6.843 ns/op
DoubleClassCheck.testIsInfiniteCMov avgt 15 16.301 ± 1.386 ns/op
DoubleClassCheck.testIsInfiniteStore avgt 15 16.230 ± 1.477 ns/op
FloatClassCheck.testIsInfiniteBranch avgt 15 38.774 ± 3.572 ns/op
FloatClassCheck.testIsInfiniteCMov avgt 15 15.064 ± 1.310 ns/op
FloatClassCheck.testIsInfiniteStore avgt 15 14.967 ± 1.298 ns/op

after:
Benchmark Mode Cnt Score Error Units
DoubleClassCheck.testIsInfiniteBranch avgt 15 39.987 ± 6.179 ns/op
DoubleClassCheck.testIsInfiniteCMov avgt 15 13.477 ± 1.159 ns/op
DoubleClassCheck.testIsInfiniteStore avgt 15 9.607 ± 0.834 ns/op
FloatClassCheck.testIsInfiniteBranch avgt 15 36.265 ± 3.168 ns/op
FloatClassCheck.testIsInfiniteCMov avgt 15 13.230 ± 1.100 ns/op
FloatClassCheck.testIsInfiniteStore avgt 15 9.492 ± 0.807 ns/op

According to 8285868 discussion, isNaN and isFinite methods intrinsification using the same approach might be not beneficial. I'm going to investigate it for RISC-V and propose methods intrinsification as part of further work in case it's profitable.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8293695: Implement isInfinite intrinsic for RISC-V

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10253/head:pull/10253
$ git checkout pull/10253

Update a local copy of the PR:
$ git checkout pull/10253
$ git pull https://git.openjdk.org/jdk pull/10253/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10253

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10253.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 13, 2022

👋 Welcome back avoitylov! 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 openjdk bot added the rfr Pull request is ready for review label Sep 13, 2022
@openjdk
Copy link

openjdk bot commented Sep 13, 2022

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

  • hotspot-compiler

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-compiler hotspot-compiler-dev@openjdk.org label Sep 13, 2022
@mlbridge
Copy link

mlbridge bot commented Sep 13, 2022

Webrevs

Copy link
Contributor

@yadongw yadongw left a comment

Choose a reason for hiding this comment

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

lgtm(not a reviewer)

Copy link
Member

@RealFYang RealFYang left a comment

Choose a reason for hiding this comment

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

Looks OK. Also passed Tier1 test on my SiFive Unmatched board.

@openjdk
Copy link

openjdk bot commented Sep 14, 2022

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

8293695: Implement isInfinite intrinsic for RISC-V

Reviewed-by: yadongwang, fyang, dsamersoff

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

  • 8f3bbe9: 8293472: Incorrect container resource limit detection if manual cgroup fs mounts present
  • 1caba0f: 8292948: JEditorPane ignores font-size styles in external linked css-file
  • eeb625e: 8290169: adlc: Improve child constraints for vector unary operations
  • 2057070: 8293815: P11PSSSignature.engineUpdate should not print debug messages during normal operation
  • 7376c55: 8293769: RISC-V: Add a second temporary register for BarrierSetAssembler::load_at
  • d191e47: 8293768: Add links to JLS 19 and 20 from SourceVersion enum constants
  • a75ddb8: 8293122: (fs) Use file cloning in macOS version of Files::copy method
  • 95c7c55: 8293402: hs-err file printer should reattempt stack trace printing if it fails
  • 211fab8: 8291669: [REDO] Fix array range check hoisting for some scaled loop iv
  • 7f3250d: 8293787: Linux aarch64 build fails after 8292591
  • ... and 10 more: https://git.openjdk.org/jdk/compare/6f2223faa170a800f76a54a6637c160eadab6232...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@RealFYang, @dsamersoff) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 14, 2022
@voitylov
Copy link
Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Sep 15, 2022
@openjdk
Copy link

openjdk bot commented Sep 15, 2022

@voitylov
Your change (at version 902bbd5) is now ready to be sponsored by a Committer.

@dsamersoff
Copy link

/sponsor

@openjdk
Copy link

openjdk bot commented Sep 15, 2022

Going to push as commit b31a03c.
Since your change was applied there have been 20 commits pushed to the master branch:

  • 8f3bbe9: 8293472: Incorrect container resource limit detection if manual cgroup fs mounts present
  • 1caba0f: 8292948: JEditorPane ignores font-size styles in external linked css-file
  • eeb625e: 8290169: adlc: Improve child constraints for vector unary operations
  • 2057070: 8293815: P11PSSSignature.engineUpdate should not print debug messages during normal operation
  • 7376c55: 8293769: RISC-V: Add a second temporary register for BarrierSetAssembler::load_at
  • d191e47: 8293768: Add links to JLS 19 and 20 from SourceVersion enum constants
  • a75ddb8: 8293122: (fs) Use file cloning in macOS version of Files::copy method
  • 95c7c55: 8293402: hs-err file printer should reattempt stack trace printing if it fails
  • 211fab8: 8291669: [REDO] Fix array range check hoisting for some scaled loop iv
  • 7f3250d: 8293787: Linux aarch64 build fails after 8292591
  • ... and 10 more: https://git.openjdk.org/jdk/compare/6f2223faa170a800f76a54a6637c160eadab6232...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 15, 2022
@openjdk openjdk bot closed this Sep 15, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Sep 15, 2022
@openjdk
Copy link

openjdk bot commented Sep 15, 2022

@dsamersoff @voitylov Pushed as commit b31a03c.

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

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
5 participants