Skip to content

Commit e2b9ef3

Browse files
authored
JIT: better addressing mode for floating point on arm64 (#65468)
1 parent dae2d02 commit e2b9ef3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/coreclr/jit/lower.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5367,7 +5367,7 @@ bool Lowering::TryCreateAddrMode(GenTree* addr, bool isContainable, GenTree* par
53675367
#ifdef TARGET_ARM64
53685368
// Check if we can "contain" LEA(BFIZ) in order to extend 32bit index to 64bit as part of load/store.
53695369
if ((index != nullptr) && index->OperIs(GT_BFIZ) && index->gtGetOp1()->OperIs(GT_CAST) &&
5370-
index->gtGetOp2()->IsCnsIntOrI() && varTypeIsIntegral(targetType))
5370+
index->gtGetOp2()->IsCnsIntOrI() && (varTypeIsIntegral(targetType) || varTypeIsFloating(targetType)))
53715371
{
53725372
// BFIZ node is a binary op where op1 is GT_CAST and op2 is GT_CNS_INT
53735373
GenTreeCast* cast = index->gtGetOp1()->AsCast();

src/coreclr/jit/morph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5511,7 +5511,7 @@ GenTree* Compiler::fgMorphArrayIndex(GenTree* tree)
55115511
// See https://github.com/dotnet/runtime/pull/61293#issuecomment-964146497
55125512

55135513
// Use 2) form only for primitive types for now - it significantly reduced number of size regressions
5514-
if (!varTypeIsIntegral(elemTyp))
5514+
if (!varTypeIsIntegral(elemTyp) && !varTypeIsFloating(elemTyp))
55155515
{
55165516
groupArrayRefWithElemOffset = false;
55175517
}

0 commit comments

Comments
 (0)