Skip to content

Commit ffa7d1a

Browse files
committed
Test commit
1 parent a104102 commit ffa7d1a

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/coreclr/jit/assertionprop.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4032,7 +4032,7 @@ RangeStatus IsRange2ImpliedByRange1(genTreeOps oper1, int bound1, genTreeOps ope
40324032
// "x > 100 && x != 10", the 2nd range check is always true
40334033
return AlwaysIncluded;
40344034
}
4035-
if (range1.startIncl == bound2 && range1.endIncl == bound2)
4035+
if ((range1.startIncl == bound2) && (range1.endIncl == bound2))
40364036
{
40374037
// "x == 100 && x != 100", the 2nd range check is never true
40384038
return NeverIntersects;

src/coreclr/jit/gentree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2104,7 +2104,7 @@ struct GenTree
21042104

21052105
void ClearUnsigned()
21062106
{
2107-
assert(OperIs(GT_ADD, GT_SUB, GT_CAST) || OperIsMul());
2107+
assert(OperIs(GT_ADD, GT_SUB, GT_CAST, GT_LE, GT_LT, GT_GT, GT_GE) || OperIsMul());
21082108
gtFlags &= ~GTF_UNSIGNED;
21092109
}
21102110

src/coreclr/jit/morph.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9135,6 +9135,12 @@ GenTree* Compiler::fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac, bool* optA
91359135
case GT_LE:
91369136
case GT_GE:
91379137
case GT_GT:
9138+
if (varTypeIsIntegral(op1) && varTypeIsIntegral(op2) && op1->IsNeverNegative(this) &&
9139+
op2->IsNeverNegative(this))
9140+
{
9141+
// Some branch optimizations don't work well with unsigned relops
9142+
tree->ClearUnsigned();
9143+
}
91389144

91399145
if (!optValnumCSE_phase && (op1->OperIs(GT_CAST) || op2->OperIs(GT_CAST)))
91409146
{

0 commit comments

Comments
 (0)