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

Check whether array index variable is an induction variable #15870

Conversation

hzongaro
Copy link
Member

In examining an array index for Idiom Recognition, analyzeOneArrayIndex checks whether the variable operand in a 'var + const' or 'const + var' expression is an induction variable. On the other hand, if the expression is a simple variable, the analysis assumes the variable reference is acceptable. However, it can happen that the variable used as the array index is not an induction variable which can result in an incorrect transformation.

Fixed this by adding a check that an array index that is a variable is also an induction variable.

Fixes #15474

Signed-off-by: Henry Zongaro zongaro@ca.ibm.com

In examining an array index for Idiom Recognition, analyzeOneArrayIndex
checks whether the variable operand in a 'var + const' or 'const + var'
expression is an induction variable.  On the other hand, if the
expression is a simple variable, the analysis assumes the variable
reference is acceptable.  However, it can happen that the variable used
as the array index is not an induction variable which can result in an
incorrect transformation.

Fixed this by adding a check that an arrayindex that is a variable is
also an induction variable.

Fixes eclipse-openj9#15474

Signed-off-by:  Henry Zongaro <zongaro@ca.ibm.com>
@hzongaro
Copy link
Member Author

@jdmpapin Devin, may I ask you to review this change?

@jdmpapin jdmpapin self-assigned this Sep 14, 2022
@jdmpapin
Copy link
Contributor

Jenkins test sanity all jdk17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JDK11 Segmentation error vmState=0x00020019
2 participants