From 6e40fff2b2eca816f66877bd87928d5f39c6eea4 Mon Sep 17 00:00:00 2001 From: Andy Ayers Date: Mon, 3 Oct 2022 09:04:17 -0700 Subject: [PATCH] JIT: don't forward sub qmarks to LCL_FLD assignments (#76524) Morph is not quite ready for this yet. Closes #76509. --- src/coreclr/jit/forwardsub.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/coreclr/jit/forwardsub.cpp b/src/coreclr/jit/forwardsub.cpp index 7e30100..2f54316 100644 --- a/src/coreclr/jit/forwardsub.cpp +++ b/src/coreclr/jit/forwardsub.cpp @@ -530,7 +530,12 @@ bool Compiler::fgForwardSubStatement(Statement* stmt) GenTree* const nextRootNodeLHS = nextRootNode->gtGetOp1(); - if (nextRootNodeLHS->OperIs(GT_LCL_VAR)) + if (!nextRootNodeLHS->OperIs(GT_LCL_VAR)) + { + JITDUMP(" can't fwd sub qmark for LCL_FLD assign\n"); + return false; + } + else { const unsigned lhsLclNum = nextRootNodeLHS->AsLclVarCommon()->GetLclNum(); LclVarDsc* const lhsVarDsc = lvaGetDesc(lhsLclNum); -- 2.7.4