Skip to content

Commit 1406427

Browse files
AndyAyersMSpull[bot]
authored andcommitted
JIT: fix assert in assertion prop (#106146)
`optAssertionPropGlobal_RelOp` had branch where it was expecting both op2 and op1 to be locals, but only had verified that op2 was. Add an extra check. Fixes #105670
1 parent 0b42b6e commit 1406427

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/coreclr/jit/assertionprop.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4409,7 +4409,7 @@ GenTree* Compiler::optAssertionPropGlobal_RelOp(ASSERT_VALARG_TP assertions, Gen
44094409
}
44104410
}
44114411
// If the assertion involves "op2" and "op1" is also a local var, then just morph the tree.
4412-
else if (op2->gtOper == GT_LCL_VAR)
4412+
else if (op1->OperIs(GT_LCL_VAR) && op2->OperIs(GT_LCL_VAR))
44134413
{
44144414
#ifdef DEBUG
44154415
if (verbose)

0 commit comments

Comments
 (0)