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

Add fix for tryToReplaceShiftLandWithRotateInstruction #4427

Merged
merged 1 commit into from
Oct 10, 2019

Conversation

AidanHa
Copy link
Contributor

@AidanHa AidanHa commented Oct 9, 2019

If the node entered is a common node, then there is no guarantee that the child of the common node will still be alive. And when we try to access the value in that node, we might receive values from a node that might've been killed already. Thus, The optimization will not work.

Fixes GH-4298

@AidanHa AidanHa requested a review from fjeremic as a code owner October 9, 2019 21:18
@@ -1816,7 +1816,6 @@ OMR::Z::TreeEvaluator::tryToReplaceShiftLandWithRotateInstruction(TR::Node * nod
// RISBG instructions perform unsigned rotation, so if we are selecting the sign bit via the logical AND we cannot
// perform a signed shift because we must preserve the sign bit. In general we cannot handle this case because we are
// not certain our input will be non-negative, hence we must conservatively disallow the optimization in such a case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting fix

Optimization will not work if the current node is commoned.

Fixes eclipseGH-4298

Signed-off-by: Aidan Ha <qbha@edu.uwaterloo.ca>
@fjeremic fjeremic changed the title tryToReplaceShiftLandWithRotateInstruction will no run with a commoned node. Add fix for tryToReplaceShiftLandWithRotateInstruction Oct 9, 2019
@fjeremic
Copy link
Contributor

fjeremic commented Oct 9, 2019

@genie-omr build zlinux,zos

@fjeremic fjeremic merged commit e6e3010 into eclipse:master Oct 10, 2019
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.

None yet

2 participants