File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -839,8 +839,7 @@ void ObjectAllocator::RewriteUses()
839839 Compiler::fgWalkResult PreOrderVisit (GenTree** use, GenTree* user)
840840 {
841841 GenTree* tree = *use;
842- assert (tree != nullptr );
843- assert (tree->IsLocal ());
842+ assert (tree->IsLocal () || tree->OperIsLocalAddr ());
844843
845844 const unsigned int lclNum = tree->AsLclVarCommon ()->GetLclNum ();
846845 unsigned int newLclNum = BAD_VAR_NUM;
@@ -849,6 +848,9 @@ void ObjectAllocator::RewriteUses()
849848 if ((lclNum < BitVecTraits::GetSize (&m_allocator->m_bitVecTraits )) &&
850849 m_allocator->MayLclVarPointToStack (lclNum))
851850 {
851+ // Analysis does not handle indirect access to pointer locals.
852+ assert (tree->OperIs (GT_LCL_VAR));
853+
852854 var_types newType;
853855 if (m_allocator->m_HeapLocalToStackLocalMap .TryGetValue (lclNum, &newLclNum))
854856 {
You can’t perform that action at this time.
0 commit comments