Skip to content

Commit 2964458

Browse files
committed
JIT: refine handle blocking logic
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
1 parent e17f25c commit 2964458

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

src/coreclr/src/jit/assertionprop.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2624,13 +2624,6 @@ GenTree* Compiler::optConstantAssertionProp(AssertionDsc* curAssertion,
26242624

26252625
case O2K_CONST_LONG:
26262626

2627-
#ifdef _TARGET_64BIT_
2628-
// Don't propagate handles if we need to report relocs.
2629-
if (opts.compReloc && ((curAssertion->op2.u1.iconFlags & GTF_ICON_HDL_MASK) != 0))
2630-
{
2631-
return nullptr;
2632-
}
2633-
#endif
26342627
if (newTree->gtType == TYP_LONG)
26352628
{
26362629
newTree->ChangeOperConst(GT_CNS_NATIVELONG);
@@ -2646,13 +2639,11 @@ GenTree* Compiler::optConstantAssertionProp(AssertionDsc* curAssertion,
26462639

26472640
case O2K_CONST_INT:
26482641

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

26572648
if (curAssertion->op2.u1.iconFlags & GTF_ICON_HDL_MASK)
26582649
{

0 commit comments

Comments
 (0)