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

8276105: C2: Conv(D|F)2(I|L)Nodes::Ideal should handle rounding correctly #6176

Closed
wants to merge 3 commits into from

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Oct 29, 2021

Happens now in master:

$ CONF=linux-x86-server-fastdebug make run-test TEST=compiler/loopopts/superword/CoLocatePack.java TEST_VM_OPTS="-XX:UseAVX=0 -XX:UseSSE=0"
...

CompileCommand: compileonly compiler/loopopts/superword/CoLocatePack.test bool compileonly = true
 191 ConvF2L === _ 714 [[ 193 ]] !jvms: CoLocatePack::test @ bci:30 (line 70)
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/phaseX.cpp:1128
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/shade/trunks/jdk/src/hotspot/share/opto/phaseX.cpp:1128), pid=1717516, tid=1717532
# fatal error: modified node was not processed by IGVN.transform_old()

After JDK-8266950 (always strictfp), the paths in Conv(D|F)2(I|L)Nodes::Ideal-s start to be taken more frequently to round float/double inputs when low SSE is enabled. On those paths, we call set_req to rewire current node, but we still return NULL from ::Ideal. I believe that is incorrect, as per node.cpp explanation: NULL indicates no graph change was done, and this should be returned when modification happened. So GVN predictably barfs.

Additional testing:

  • Linux x86_32 tier1 with -XX:UseAVX=0 -XX:UseSSE=0 (now pass)
  • Linux x86_32 tier1 default (still pass)
  • Linux x86_64 tier1 default

Progress

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

Issue

  • JDK-8276105: C2: Conv(D|F)2(I|L)Nodes::Ideal should handle rounding correctly

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6176

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 29, 2021

👋 Welcome back shade! 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 Oct 29, 2021

@shipilev 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 Oct 29, 2021
@shipilev shipilev marked this pull request as ready for review Oct 29, 2021
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 29, 2021
@mlbridge
Copy link

mlbridge bot commented Oct 29, 2021

Webrevs

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Correct.

@openjdk
Copy link

openjdk bot commented Oct 29, 2021

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

8276105: C2: Conv(D|F)2(I|L)Nodes::Ideal should handle rounding correctly

Reviewed-by: kvn, thartmann

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

  • c8abe35: 8276121: G1: Remove unused and uninitialized _g1h in g1SATBMarkQueueSet.hpp
  • f55e68c: 8275950: Use only _thread_in_vm in ~ThreadBlockInVMPreprocess()
  • 4ac8403: 8276218: JFR: Clean up jdk.jfr.dcmd
  • 89ade1d: 8273416: C2: assert(false) failed: bad AD file after JDK-8252372 with UseSSE={0,1}
  • dbf5100: 8276201: Shenandoah: Race results degenerated GC to enter wrong entry point

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 Oct 29, 2021
@navyxliu
Copy link
Member

navyxliu commented Oct 29, 2021

LGTM.
Prior code style in ConvD2INode::Ideal is obscure. This patch also makes it look better.

@shipilev
Copy link
Member Author

shipilev commented Nov 1, 2021

Thank you, @vnkozlov, @navyxliu. I think I need a second Hotspot (R)eviewer for this?

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Looks good. Is it worth adding the flag combinations to the test?

src/hotspot/share/opto/convertnode.cpp Outdated Show resolved Hide resolved
@shipilev
Copy link
Member Author

shipilev commented Nov 1, 2021

Looks good. Is it worth adding the flag combinations to the test?

Honestly, the fact that we fail on that SuperWord packing tier1 test appears to be a pure luck. Also, x86_64 would default to UseSSE >= 2 anyway, so such a config would only make sense for x86_32 running in a quite old mode. So, instead of adding the test configuration to the test, I just added some -XX:UseSSE=0 -XX:UseAVX=0 runs to our CIs. It is unlikely we would regress this particular place again.

@shipilev
Copy link
Member Author

shipilev commented Nov 2, 2021

All right, if anyone has any other comments, we can do those in follow-ups.

/integrate

@openjdk
Copy link

openjdk bot commented Nov 2, 2021

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

  • acceffc: 8273704: DrawStringWithInfiniteXform.java failed : drawString with InfiniteXform transform takes long time
  • 2eafa03: 8276234: Trivially clean up locale-related code
  • 47e7a42: 8262945: [macos] Regression Manual Test for Key Events Fails
  • 99b7b95: 8276205: Shenandoah: CodeCache_lock should always be held for initializing code cache iteration
  • 9771544: 8260428: Drop support for pre JDK 1.4 DatagramSocketImpl implementations
  • e265f83: 8276107: Preventive collections trigger before maxing out heap
  • c8abe35: 8276121: G1: Remove unused and uninitialized _g1h in g1SATBMarkQueueSet.hpp
  • f55e68c: 8275950: Use only _thread_in_vm in ~ThreadBlockInVMPreprocess()
  • 4ac8403: 8276218: JFR: Clean up jdk.jfr.dcmd
  • 89ade1d: 8273416: C2: assert(false) failed: bad AD file after JDK-8252372 with UseSSE={0,1}
  • ... and 1 more: https://git.openjdk.java.net/jdk/compare/5bb1992b8408a0d196b1afa308bc00d007458dbd...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 2, 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 Nov 2, 2021
@openjdk
Copy link

openjdk bot commented Nov 2, 2021

@shipilev Pushed as commit 0488ebd.

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

@shipilev shipilev deleted the JDK-8276105-c2-igvn branch Nov 2, 2021
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
4 participants