Integrated: 8259777: Incorrect predication condition generated by ADLC

Jatin Bhateja jbhateja at openjdk.java.net
Fri Jan 15 15:06:08 UTC 2021


On Thu, 14 Jan 2021 13:13:21 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

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

This pull request has now been integrated.

Changeset: bcf20a0d
Author:    Jatin Bhateja <jbhateja at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/bcf20a0d
Stats:     26 lines in 2 files changed: 15 ins; 0 del; 11 mod

8259777: Incorrect predication condition generated by ADLC

Reviewed-by: vlivanov

-------------

PR: https://git.openjdk.java.net/jdk/pull/2080


More information about the hotspot-compiler-dev mailing list