@@ -1324,6 +1324,7 @@ void Lowering::LowerArg(GenTreeCall* call, GenTreePtr* ppArg)
1324
1324
if (varTypeIsFloating (type))
1325
1325
{
1326
1326
#ifdef _TARGET_ARM_
1327
+ #ifdef DEBUG
1327
1328
if (type == TYP_DOUBLE)
1328
1329
{
1329
1330
unsigned numRegs = info->numRegs ;
@@ -1339,19 +1340,22 @@ void Lowering::LowerArg(GenTreeCall* call, GenTreePtr* ppArg)
1339
1340
regCurr = REG_NEXT (regNext);
1340
1341
}
1341
1342
}
1343
+ #endif // DEBUG
1342
1344
#endif // _TARGET_ARM_
1343
1345
1344
1346
GenTreePtr intArg = LowerFloatArg (arg, info);
1345
- if (arg != intArg )
1347
+ if (intArg != nullptr )
1346
1348
{
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
+ }
1349
1355
1350
- // update local variable .
1351
- arg = intArg ;
1356
+ // update local variables .
1357
+ type = arg-> TypeGet () ;
1352
1358
}
1353
- // Arg type could be changed in place.
1354
- type = arg->TypeGet ();
1355
1359
}
1356
1360
}
1357
1361
#endif // _TARGET_ARMARCH_
@@ -1369,6 +1373,20 @@ void Lowering::LowerArg(GenTreeCall* call, GenTreePtr* ppArg)
1369
1373
}
1370
1374
1371
1375
#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
+ //
1372
1390
GenTreePtr Lowering::LowerFloatArg (GenTreePtr arg, fgArgTabEntryPtr info, unsigned argNum)
1373
1391
{
1374
1392
var_types type = arg->TypeGet ();
0 commit comments