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

8259777: Incorrect predication condition generated by ADLC #2080

Closed
wants to merge 1 commit into from

Conversation

jatin-bhateja
Copy link
Member

@jatin-bhateja jatin-bhateja commented Jan 14, 2021

Please consider following instruction selection pattern:-

match(Set dst (VectorBlend (Binary src1 (AddVB src1 src2)) mask));

Currently, ADLC emits following predication check for src1 in matcher DFA.

/*src1*/(_kids[0]->_kids[0]->_leaf == _kids[1]->_kids[0]->_leaf)

src1 appears twice in the State tree corresponding to this pattern, first as the leaf of left child state of Binary node which is
left child state of VectorBlend and secondly as the leaf of left child of AddVB which is the right child state of Binary node.
Thus following is the correct predication check to test both the occurrences of src1.

/*src1*/(_kids[0]->_kids[0]->_leaf == _kids[0]->_kids[1]->_kids[0]->_leaf)

This patch does a minor re-organizes the predication generation algorithm to fix this issue.

Validated that there is no change in generated DFA for current X86 AD files with and without this patch since such instruction patterns do not exist in AD files currently.


Progress

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

Issue

  • JDK-8259777: Incorrect predication condition generated by ADLC

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2080/head:pull/2080
$ git checkout pull/2080

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 14, 2021

👋 Welcome back jbhateja! 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 Jan 14, 2021
@openjdk
Copy link

openjdk bot commented Jan 14, 2021

@jatin-bhateja 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 Jan 14, 2021
@mlbridge
Copy link

mlbridge bot commented Jan 14, 2021

Webrevs

Copy link
Contributor

@iwanowww iwanowww 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.

@openjdk
Copy link

openjdk bot commented Jan 14, 2021

@jatin-bhateja 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:

8259777: Incorrect predication condition generated by ADLC

Reviewed-by: vlivanov

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

  • ff3e6e4: 8259773: Incorrect encoding of AVX-512 kmovq instruction
  • b8ef2ba: 8259563: The CPU model name is printed multiple times when using -Xlog:os+cpu
  • b040a3d: 8259631: Reapply pattern match instanceof use in HttpClientImpl
  • 3462f7a: 8256955: Move includes of events.hpp out of header files

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 Jan 14, 2021
@jatin-bhateja
Copy link
Member Author

Looks good.

Hi Vladimir, Please suggest if its ok to push this patch with one reviewer approval.

@mlbridge
Copy link

mlbridge bot commented Jan 14, 2021

Mailing list message from Vladimir Ivanov on hotspot-compiler-dev:

The guideline is to wait around a day to give people a chance speak up.
Otherwise, I don't see a problem having a single (R)eview here.

Best regards,
Vladimir Ivanov

On 14.01.2021 20:31, Jatin Bhateja wrote:

@jatin-bhateja
Copy link
Member Author

/integrate

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

openjdk bot commented Jan 15, 2021

@jatin-bhateja Since your change was applied there have been 28 commits pushed to the master branch:

  • bbac91a: 8257959: Add gtest run with -XX:+UseLargePages
  • 707bce0: 8257212: (bf spec) Clarify byte order of the buffer returned by CharBuffer.subsequence(int,int)
  • 0ec2c96: 8259820: JShell does not handle -source 8 properly
  • b01a15e: 8258884: [TEST_BUG] Convert applet-based test open/test/jdk/javax/swing/JMenuItem/8031573/bug8031573.java to a regular java test
  • 6d4a593: 8259627: Potential memory leaks in JVMTI after JDK-8227745
  • 2c8e337: 8259622: TreeMap.computeIfAbsent deviates from spec
  • d701bab: Merge
  • 4307fa6: 8253505: JFR: onFlush invoked out of order with a sorted event stream
  • 0148adf: 8255120: C2: assert(outer->outcnt() >= phis + 2 && outer->outcnt() <= phis + 2 + stores + 1) failed: only phis
  • 90960c5: 8252657: JVMTI agent is not unloaded when Agent_OnAttach is failed
  • ... and 18 more: https://git.openjdk.java.net/jdk/compare/8b8b1f9a37d8606848e40aede006db8129cdac39...master

Your commit was automatically rebased without conflicts.

Pushed as commit bcf20a0.

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

@jatin-bhateja jatin-bhateja deleted the JDK-8259777 branch February 11, 2021 15:09
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.

2 participants