Skip to content

Commit

Permalink
JIT: better addressing mode for floating point on arm64 (#65468)
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorBo committed Feb 17, 2022
1 parent dae2d02 commit e2b9ef3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/coreclr/jit/lower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5367,7 +5367,7 @@ bool Lowering::TryCreateAddrMode(GenTree* addr, bool isContainable, GenTree* par
#ifdef TARGET_ARM64
// Check if we can "contain" LEA(BFIZ) in order to extend 32bit index to 64bit as part of load/store.
if ((index != nullptr) && index->OperIs(GT_BFIZ) && index->gtGetOp1()->OperIs(GT_CAST) &&
index->gtGetOp2()->IsCnsIntOrI() && varTypeIsIntegral(targetType))
index->gtGetOp2()->IsCnsIntOrI() && (varTypeIsIntegral(targetType) || varTypeIsFloating(targetType)))
{
// BFIZ node is a binary op where op1 is GT_CAST and op2 is GT_CNS_INT
GenTreeCast* cast = index->gtGetOp1()->AsCast();
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5511,7 +5511,7 @@ GenTree* Compiler::fgMorphArrayIndex(GenTree* tree)
// See https://github.com/dotnet/runtime/pull/61293#issuecomment-964146497

// Use 2) form only for primitive types for now - it significantly reduced number of size regressions
if (!varTypeIsIntegral(elemTyp))
if (!varTypeIsIntegral(elemTyp) && !varTypeIsFloating(elemTyp))
{
groupArrayRefWithElemOffset = false;
}
Expand Down

0 comments on commit e2b9ef3

Please sign in to comment.