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 if mul can overflow during BNDCHK simplification #7575

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nbhuiyan
Copy link
Contributor

For BNDCHK nodes where the first child is a constant and the second child is a multiplication operation, with the multiplier child being a constant, it was getting simplified such that the bound value was being divided by the multiplier. While this is a valid simplification that eliminates the multiplication operation, it would only be valid if we could guarantee that the multiplication was not going to overflow. This change ensures that this simplification is performed only for mul operation nodes that have been marked as cannotOverflow.

Issue: eclipse-openj9/openj9#19139

For BNDCHK nodes where the first child is a constant and the second
child is a multiplication operation, with the multiplier child being a
constant, it was getting simplified such that the bound value was
being divided by the multiplier. While this is a valid simplification
that eliminates the multiplication operation, it would only be valid
if we could guarantee that the multiplication was not going to
overflow. This change ensures that this simplification is performed
only for mul operation nodes that have been marked as cannotOverflow.

Signed-off-by: Nazim Bhuiyan <[email protected]>
@nbhuiyan
Copy link
Contributor Author

@hzongaro requesting review

@hzongaro hzongaro self-assigned this Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants