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

Commit f99ca8c

Browse files
FeiPengInteltannergooding
authored andcommitted
Improve struct promotion for 256-bit SIMD fields
1 parent cbbfca3 commit f99ca8c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/jit/lclvars.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,8 +1496,9 @@ void Compiler::lvaCanPromoteStructType(CORINFO_CLASS_HANDLE typeHnd,
14961496
CLANG_FORMAT_COMMENT_ANCHOR;
14971497
#if defined(FEATURE_SIMD)
14981498
#if defined(_TARGET_XARCH_)
1499-
// This will allow promotion of 2 Vector<T> fields on AVX2, or 4 Vector<T> fields on SSE2.
1500-
const int MaxOffset = MAX_NumOfFieldsInPromotableStruct * XMM_REGSIZE_BYTES;
1499+
// This will allow promotion of 4 Vector<T> fields on AVX2 or Vector256<T> on AVX,
1500+
// or 8 Vector<T>/Vector128<T> fields on SSE2.
1501+
const int MaxOffset = MAX_NumOfFieldsInPromotableStruct * YMM_REGSIZE_BYTES;
15011502
#elif defined(_TARGET_ARM64_)
15021503
const int MaxOffset = MAX_NumOfFieldsInPromotableStruct * FP_REGSIZE_BYTES;
15031504
#endif // defined(_TARGET_XARCH_) || defined(_TARGET_ARM64_)

0 commit comments

Comments
 (0)