Skip to content

Commit 06062e7

Browse files
authored
JIT: Fix flags updating when sinking stores below commas (#100005)
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 #99929
1 parent d3a7c42 commit 06062e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/coreclr/jit/importer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,8 +1019,8 @@ GenTree* Compiler::impStoreStruct(GenTree* store,
10191019
// Instead, we're going to sink the store below the COMMA.
10201020
store->Data() = src->AsOp()->gtOp2;
10211021
src->AsOp()->gtOp2 = impStoreStruct(store, curLevel, pAfterStmt, usedDI, block);
1022-
src->SetAllEffectsFlags(src->AsOp()->gtOp1, src->AsOp()->gtOp2);
10231022
gtUpdateNodeSideEffects(store);
1023+
src->SetAllEffectsFlags(src->AsOp()->gtOp1, src->AsOp()->gtOp2);
10241024

10251025
return src;
10261026
}

0 commit comments

Comments
 (0)