This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Updating the JIT to take EnableSSE3_4 into account when setting the supported instruction sets #16395
Merged
Merged
Updating the JIT to take EnableSSE3_4 into account when setting the supported instruction sets #16395
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7462,7 +7462,10 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
return SIMD_AVX2_Supported; | ||
} | ||
|
||
if (CanUseSSE4()) | ||
// SIMD_SSE4_Supported actually requires all of SSE3, SSSE3, SSE4.1, and SSE4.2 | ||
// to be supported. We can only enable it if all four are enabled in the compiler | ||
if (compSupports(InstructionSet_SSE42) && compSupports(InstructionSet_SSE41) && | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could create a |
||
compSupports(InstructionSet_SSSE3) && compSupports(InstructionSet_SSE3)) | ||
{ | ||
return SIMD_SSE4_Supported; | ||
} | ||
|
@@ -7992,7 +7995,7 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
return false; | ||
} | ||
|
||
// Whether SSE2 is available | ||
// Whether SSE and SSE2 is available | ||
bool canUseSSE2() const | ||
{ | ||
#ifdef _TARGET_XARCH_ | ||
|
@@ -8002,16 +8005,6 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
#endif | ||
} | ||
|
||
// Whether SSE3, SSSE3, SSE4.1 and SSE4.2 is available | ||
bool CanUseSSE4() const | ||
{ | ||
#ifdef _TARGET_XARCH_ | ||
return opts.compCanUseSSE4; | ||
#else | ||
return false; | ||
#endif | ||
} | ||
|
||
bool compSupports(InstructionSet isa) const | ||
{ | ||
#if defined(_TARGET_XARCH_) || defined(_TARGET_ARM64_) | ||
|
@@ -8137,7 +8130,6 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
bool compUseCMOV; | ||
#ifdef _TARGET_XARCH_ | ||
bool compCanUseSSE2; // Allow CodeGen to use "movq XMM" instructions | ||
bool compCanUseSSE4; // Allow CodeGen to use SSE3, SSSE3, SSE4.1 and SSE4.2 instructions | ||
#endif // _TARGET_XARCH_ | ||
|
||
#if defined(_TARGET_XARCH_) || defined(_TARGET_ARM64_) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to consider changing the name of this flag, as this is a bit confusing. But I don't think it's critical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I'll log a bug to track it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/dotnet/coreclr/issues/16421