Skip to content

Commit

Permalink
JIT: refine handle blocking logic
Browse files Browse the repository at this point in the history
Assertion prop uses `O2K_CONST_INT` for handles, even on 64 bit targets. Make
suitable adjustments to the handle propagation blocking logic.

Problem was introduced in dotnet#1593 and exposed by dotnet#1309.

Fixes dotnet#1777
  • Loading branch information
AndyAyersMS committed Jan 16, 2020
1 parent e17f25c commit 2964458
Showing 1 changed file with 0 additions and 9 deletions.
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
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

0 comments on commit 2964458

Please sign in to comment.