diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index 13e81bda6ac74e..bf590a34cfae19 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -10975,7 +10975,8 @@ GenTree* Compiler::fgOptimizeRelationalComparisonWithFullRangeConst(GenTreeOp* c ret = gtNewZeroConNode(TYP_INT); } // [x0, x1] < [y0, y1] is true if x1 < y0 - else if ((op == GT_LT) && (lhsMax < rhsMin)) + // [x0, x1] <= [y0, y1] is true if x1 <= y0 + else if (((op == GT_LT) && (lhsMax < rhsMin)) || ((op == GT_LE) && (lhsMax <= rhsMin))) { ret = gtNewOneConNode(TYP_INT); }