Skip to content

Commit 926062a

Browse files
Always set GTF_GLOB_REF on block indirs (#84731)
Eventually, this logic will be shared by all indirs.
1 parent d83e2cc commit 926062a

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/coreclr/jit/compiler.hpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,16 +1196,7 @@ inline GenTreeBlk* Compiler::gtNewBlkIndir(ClassLayout* layout, GenTree* addr, G
11961196
blkNode->gtFlags |= indirFlags;
11971197
blkNode->SetIndirExceptionFlags(this);
11981198

1199-
// TODO-Bug: this method does not have enough information to make this determination.
1200-
// The local may end up (or already is) address-exposed.
1201-
if (addr->OperIs(GT_LCL_ADDR))
1202-
{
1203-
if (lvaIsImplicitByRefLocal(addr->AsLclVarCommon()->GetLclNum()))
1204-
{
1205-
blkNode->gtFlags |= GTF_GLOB_REF;
1206-
}
1207-
}
1208-
else
1199+
if ((indirFlags & GTF_IND_INVARIANT) == 0)
12091200
{
12101201
blkNode->gtFlags |= GTF_GLOB_REF;
12111202
}

0 commit comments

Comments
 (0)