Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

erozenfeld
Copy link
Member

This change fixes a morpher transformation of multiplication to shift
to preserve the value number of the tree since the new shift expression
will compute the same value as the old multiplication expression.
Without that change we were getting asserts in fgMoveOpsLeft,
which expects to see value numbers on trees it transforms.

Closes #2920.

@erozenfeld
Copy link
Member Author

@briansull PTAL
/cc @dotnet/jit-contrib

@erozenfeld
Copy link
Member Author

@dotnet-bot test Windows_NT jitstress1

@erozenfeld
Copy link
Member Author

@dotnet-bot test Windows_NT jitstress2

void GenTree::SetOper(genTreeOps oper)
void GenTree::SetOper(genTreeOps oper, bool clearVN)
{
gtOper = oper;

Choose a reason for hiding this comment

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

I don't think we have tried building the JIT without SMALL_TREE_NODES defined in quite sometime.
But you should go ahead and add the if (clearVM) logic here as well as it appears to just be missing.
The instance field gtVNPair is available with and without SMALL_TREE_NODES.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@erozenfeld
Copy link
Member Author

@briansull I addressed your feedback, PTAL.

This change fixes a morpher transformation of multiplication to shift
to preserve the value number of the tree since the new shift expression
will compute the same value as the old multiplication expression.
Without that change we were getting  asserts in fgMoveOpsLeft,
which expects to see value numbers on trees it transforms.

Closes #2920.
@erozenfeld
Copy link
Member Author

@dotnet-bot retest

@erozenfeld
Copy link
Member Author

@dotnet-bot test Windows_NT jitstress1

@erozenfeld
Copy link
Member Author

@dotnet-bot test Windows_NT jitstress2

@CarolEidt
Copy link

LGTM

1 similar comment
@briansull
Copy link

LGTM

erozenfeld added a commit that referenced this pull request Feb 8, 2016
Preserve value numbers when morphing multiplication into shift.
@erozenfeld erozenfeld merged commit f087eb3 into dotnet:master Feb 8, 2016
@erozenfeld erozenfeld deleted the MultToShiftVN branch February 8, 2016 23:37
erozenfeld added a commit to erozenfeld/coreclr that referenced this pull request Feb 10, 2016
The code to change multiplication to shift shouldn't be
under LEA_AVAILABLE since the code to process multiplication
by power of 2 isn't.
erozenfeld added a commit that referenced this pull request Feb 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JitStress: Assert fault in SP1a2

5 participants