From 7db5a577938d83c76f0654635d6ffe1598358097 Mon Sep 17 00:00:00 2001 From: David Wrighton Date: Thu, 10 Nov 2022 16:50:03 -0800 Subject: [PATCH] Fix morph issue with fgOptimizeEqualityComparisonWithConst (#78187) * Fix morph issue with fgOptimizeEqualityComparisonWithConst - On arm32 a shift of a long requires a helper call, but the optimization in fgOptimizeEqualityComparisonWithConst for converting a right shift into a left shift was not keeping the GTF_CALL flag on the GenTree node. * Update src/coreclr/jit/morph.cpp Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> --- src/coreclr/jit/morph.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index ea291fd21c3e0..2842b3b3e7dbd 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -11476,8 +11476,8 @@ GenTree* Compiler::fgOptimizeEqualityComparisonWithConst(GenTreeOp* cmp) rshiftOp->gtOp1 = andOp->gtGetOp2(); andOp->gtOp2 = rshiftOp; - rshiftOp->SetAllEffectsFlags(rshiftOp->gtGetOp1(), rshiftOp->gtGetOp2()); rshiftOp->SetOper(GT_LSH); + gtUpdateNodeSideEffects(rshiftOp); } // Reverse the condition if necessary.