Skip to content

Commit

Permalink
Fix loop hoisting float var profitability calculation (#82352)
Browse files Browse the repository at this point in the history
Treat SIMD as float vars.
  • Loading branch information
BruceForstall committed Feb 22, 2023
1 parent 85ed809 commit f8dc059
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/jit/optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7002,7 +7002,7 @@ bool Compiler::optIsProfitableToHoistTree(GenTree* tree, unsigned lnum)
int loopVarCount;
int varInOutCount;

if (varTypeIsFloating(tree))
if (varTypeUsesFloatReg(tree))
{
hoistedExprCount = pLoopDsc->lpHoistedFPExprCount;
loopVarCount = pLoopDsc->lpLoopVarFPCount;
Expand Down Expand Up @@ -8509,7 +8509,7 @@ void Compiler::optComputeInterestingVarSets()
LclVarDsc* varDsc = lvaGetDesc(i);
if (varDsc->lvTracked)
{
if (varTypeIsFloating(varDsc->lvType))
if (varTypeUsesFloatReg(varDsc->lvType))
{
VarSetOps::AddElemD(this, lvaFloatVars, varDsc->lvVarIndex);
}
Expand Down

0 comments on commit f8dc059

Please sign in to comment.