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

Commit

Permalink
Improve struct promotion for 256-bit SIMD fields
Browse files Browse the repository at this point in the history
  • Loading branch information
FeiPengIntel authored and tannergooding committed Aug 29, 2018
1 parent cbbfca3 commit f99ca8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/jit/lclvars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1496,8 +1496,9 @@ void Compiler::lvaCanPromoteStructType(CORINFO_CLASS_HANDLE typeHnd,
CLANG_FORMAT_COMMENT_ANCHOR;
#if defined(FEATURE_SIMD)
#if defined(_TARGET_XARCH_)
// This will allow promotion of 2 Vector<T> fields on AVX2, or 4 Vector<T> fields on SSE2.
const int MaxOffset = MAX_NumOfFieldsInPromotableStruct * XMM_REGSIZE_BYTES;
// This will allow promotion of 4 Vector<T> fields on AVX2 or Vector256<T> on AVX,
// or 8 Vector<T>/Vector128<T> fields on SSE2.
const int MaxOffset = MAX_NumOfFieldsInPromotableStruct * YMM_REGSIZE_BYTES;
#elif defined(_TARGET_ARM64_)
const int MaxOffset = MAX_NumOfFieldsInPromotableStruct * FP_REGSIZE_BYTES;
#endif // defined(_TARGET_XARCH_) || defined(_TARGET_ARM64_)
Expand Down

0 comments on commit f99ca8c

Please sign in to comment.