Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 70769b7

Browse files
authored
Merge pull request #6281 from papaslavik/cse_sort_sz
The sort for CSE size optimization should be different from exec
2 parents be81369 + 39fbf97 commit 70769b7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/jit/optcse.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,19 +432,19 @@ int __cdecl Compiler::optCSEcostCmpSz(const void *op1, const void *op2)
432432

433433
int diff;
434434

435-
diff = (int)(exp2->gtCostEx - exp1->gtCostEx);
435+
diff = (int)(exp2->gtCostSz - exp1->gtCostSz);
436436

437437
if (diff != 0)
438438
return diff;
439439

440440
// Sort the higher Use Counts toward the top
441-
diff = (int)(dsc2->csdUseWtCnt - dsc1->csdUseWtCnt);
441+
diff = (int)(dsc2->csdUseCount - dsc1->csdUseCount);
442442

443443
if (diff != 0)
444444
return diff;
445445

446446
// With the same use count, Sort the lower Def Counts toward the top
447-
diff = (int)(dsc1->csdDefWtCnt - dsc2->csdDefWtCnt);
447+
diff = (int)(dsc1->csdDefCount - dsc2->csdDefCount);
448448

449449
if (diff != 0)
450450
return diff;

0 commit comments

Comments
 (0)