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

Commit d073595

Browse files
author
Sergey Andreenko
committed
add comments
1 parent 6a6627e commit d073595

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

src/jit/lower.cpp

+25-7
Original file line numberDiff line numberDiff line change
@@ -1324,6 +1324,7 @@ void Lowering::LowerArg(GenTreeCall* call, GenTreePtr* ppArg)
13241324
if (varTypeIsFloating(type))
13251325
{
13261326
#ifdef _TARGET_ARM_
1327+
#ifdef DEBUG
13271328
if (type == TYP_DOUBLE)
13281329
{
13291330
unsigned numRegs = info->numRegs;
@@ -1339,19 +1340,22 @@ void Lowering::LowerArg(GenTreeCall* call, GenTreePtr* ppArg)
13391340
regCurr = REG_NEXT(regNext);
13401341
}
13411342
}
1343+
#endif // DEBUG
13421344
#endif // _TARGET_ARM_
13431345

13441346
GenTreePtr intArg = LowerFloatArg(arg, info);
1345-
if (arg != intArg)
1347+
if (intArg != nullptr)
13461348
{
1347-
info->node = intArg;
1348-
ReplaceArgWithPutArgOrBitcast(ppArg, intArg);
1349+
if (intArg != arg)
1350+
{
1351+
ReplaceArgWithPutArgOrBitcast(ppArg, intArg);
1352+
arg = intArg;
1353+
info->node = intArg;
1354+
}
13491355

1350-
// update local variable.
1351-
arg = intArg;
1356+
// update local variables.
1357+
type = arg->TypeGet();
13521358
}
1353-
// Arg type could be changed in place.
1354-
type = arg->TypeGet();
13551359
}
13561360
}
13571361
#endif // _TARGET_ARMARCH_
@@ -1369,6 +1373,20 @@ void Lowering::LowerArg(GenTreeCall* call, GenTreePtr* ppArg)
13691373
}
13701374

13711375
#ifdef _TARGET_ARMARCH_
1376+
//------------------------------------------------------------------------
1377+
// LowerFloatArg: Lower the float call argument on the arm platform.
1378+
//
1379+
// Arguments:
1380+
// arg - The arg node
1381+
// info - call argument info
1382+
// argNum - argument number
1383+
//
1384+
//
1385+
// Return Value:
1386+
// Return nullptr, if no transformation was done;
1387+
// return arg if there was in place transformation;
1388+
// return a new tree if the root was changed.
1389+
//
13721390
GenTreePtr Lowering::LowerFloatArg(GenTreePtr arg, fgArgTabEntryPtr info, unsigned argNum)
13731391
{
13741392
var_types type = arg->TypeGet();

0 commit comments

Comments
 (0)