Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/coreclr/src/jit/assertionprop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2624,13 +2624,6 @@ GenTree* Compiler::optConstantAssertionProp(AssertionDsc* curAssertion,

case O2K_CONST_LONG:

#ifdef _TARGET_64BIT_
// Don't propagate handles if we need to report relocs.
if (opts.compReloc && ((curAssertion->op2.u1.iconFlags & GTF_ICON_HDL_MASK) != 0))
{
return nullptr;
}
#endif
Copy link
Contributor

Choose a reason for hiding this comment

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

You could add an assert here to insure that no change introduces a TYP_LONG witha reloc:

assert((curAssertion->op2.u1.iconFlags & GTF_ICON_HDL_MASK) == 0);

Copy link
Member Author

Choose a reason for hiding this comment

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

How about adding this kind of check to optDebugCheckAssertion?

Copy link
Member Author

Choose a reason for hiding this comment

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

Might make sense to merge this to unblock crossgen2 and add the assert in another PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am fine with that

if (newTree->gtType == TYP_LONG)
{
newTree->ChangeOperConst(GT_CNS_NATIVELONG);
Expand All @@ -2646,13 +2639,11 @@ GenTree* Compiler::optConstantAssertionProp(AssertionDsc* curAssertion,

case O2K_CONST_INT:

#ifndef _TARGET_64BIT_
// Don't propagate handles if we need to report relocs.
if (opts.compReloc && ((curAssertion->op2.u1.iconFlags & GTF_ICON_HDL_MASK) != 0))
{
return nullptr;
}
#endif

if (curAssertion->op2.u1.iconFlags & GTF_ICON_HDL_MASK)
{
Expand Down