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 committed Aug 24, 2018
1 parent fa4c1c4 commit acb9402
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 @@ -1497,8 +1497,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 acb9402

Please sign in to comment.