File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -12351,9 +12351,21 @@ inline LoopDefinitions::LocalDefinitionsMap* LoopDefinitions::GetOrCreateMap(Flo
1235112351 fgWalkResult PreOrderVisit (GenTree** use, GenTree* user)
1235212352 {
1235312353 GenTreeLclVarCommon* lcl = (*use)->AsLclVarCommon ();
12354- if (!lcl->OperIsLocalStore () && (!m_optForCrossBlock || !lcl->OperIs (GT_LCL_ADDR)))
12354+
12355+ if (m_optForCrossBlock)
12356+ {
12357+ if (!lcl->OperIsLocalStore () &&
12358+ !(lcl->OperIs (GT_LCL_ADDR) && m_compiler->gtNodeHasSideEffects (user, GTF_PERSISTENT_SIDE_EFFECTS)))
12359+ {
12360+ return Compiler::WALK_CONTINUE;
12361+ }
12362+ }
12363+ else
1235512364 {
12356- return Compiler::WALK_CONTINUE;
12365+ if (!lcl->OperIsLocalStore ())
12366+ {
12367+ return Compiler::WALK_CONTINUE;
12368+ }
1235712369 }
1235812370
1235912371 m_map->Set (lcl->GetLclNum (), true , LocalDefinitionsMap::Overwrite);
You can’t perform that action at this time.
0 commit comments