From 2a3f5be28e668c7c03920ff7b4162b2a8e8107bd Mon Sep 17 00:00:00 2001 From: Jakob Botsch Nielsen Date: Mon, 19 Jun 2023 22:29:54 +0200 Subject: [PATCH] JIT: Fix LocalUses::FindAccess (#87732) The function is looking for access information with a specified type at a specified offset, but was using the wrong list here. That would in some cases with overlapping accesses cause us to fail to find the Access. The net result is that we rarely end up not promoting some induced accesses that we would otherwise promote. --- src/coreclr/jit/promotion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/promotion.cpp b/src/coreclr/jit/promotion.cpp index da79080521b82..98f4a7949f5c4 100644 --- a/src/coreclr/jit/promotion.cpp +++ b/src/coreclr/jit/promotion.cpp @@ -793,7 +793,7 @@ class LocalUses } index++; - } while ((index < m_inducedAccesses.size()) && (m_inducedAccesses[index].Offset == offs)); + } while ((index < m_accesses.size()) && (m_accesses[index].Offset == offs)); return nullptr; }