From 220ac849ebcaabd67f4eb68ac98d0690a33fadca Mon Sep 17 00:00:00 2001 From: Will Smith Date: Mon, 20 Jun 2022 11:32:36 -0700 Subject: [PATCH] Use `gtEffectiveVal` for `GT_ADD` op1 in `optCreateAssertion` (#70228) * Initial work for comma hoisting in cse * Formatting * Adding more ops to comma hoisting * Set regnum * Update optcse.cpp * Using effectiveval instead --- src/coreclr/jit/assertionprop.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/jit/assertionprop.cpp b/src/coreclr/jit/assertionprop.cpp index 280d1fef56dc0..ccade20df0fbc 100644 --- a/src/coreclr/jit/assertionprop.cpp +++ b/src/coreclr/jit/assertionprop.cpp @@ -1344,12 +1344,12 @@ AssertionIndex Compiler::optCreateAssertion(GenTree* op1, if (op1->gtGetOp2()->IsCnsIntOrI()) { offset += op1->gtGetOp2()->AsIntCon()->gtIconVal; - op1 = op1->gtGetOp1(); + op1 = op1->gtGetOp1()->gtEffectiveVal(/* commaOnly */ true); } else if (op1->gtGetOp1()->IsCnsIntOrI()) { offset += op1->gtGetOp1()->AsIntCon()->gtIconVal; - op1 = op1->gtGetOp2(); + op1 = op1->gtGetOp2()->gtEffectiveVal(/* commaOnly */ true); } else {