Skip to content

Commit

Permalink
JIT: Fix flags updating when sinking stores below commas
Browse files Browse the repository at this point in the history
When we sink a store below a comma, we should update the comma's flags
after updating the flags of the store, not before.

Fix dotnet#99929
  • Loading branch information
jakobbotsch committed Mar 20, 2024
1 parent 41d08f9 commit c546af9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coreclr/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1019,8 +1019,8 @@ GenTree* Compiler::impStoreStruct(GenTree* store,
// Instead, we're going to sink the store below the COMMA.
store->Data() = src->AsOp()->gtOp2;
src->AsOp()->gtOp2 = impStoreStruct(store, curLevel, pAfterStmt, usedDI, block);
src->SetAllEffectsFlags(src->AsOp()->gtOp1, src->AsOp()->gtOp2);
gtUpdateNodeSideEffects(store);
src->SetAllEffectsFlags(src->AsOp()->gtOp1, src->AsOp()->gtOp2);

return src;
}
Expand Down

0 comments on commit c546af9

Please sign in to comment.