-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - add MMX/SSE/AVX/AVX512 PMULHRSW intrinsics to be used in constexpr #160636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+52
−31
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5114dec
Add support for constexpr with PMULHRSW
Temperz87 8b38951
Remove accidentally new include directive
Temperz87 b8311d2
Merge remote-tracking branch 'upstream/main'
Temperz87 412712f
Fix capitalization of local variables
Temperz87 125542b
Formatting changes, don't use saturated add
Temperz87 b206462
Format
Temperz87 d91a352
mask/maskz tests
Temperz87 84155ce
Format
Temperz87 59d447d
I think that's all the format issues?
Temperz87 7b7338f
Change folding procedure to match intel instrinics guide (and actuall…
Temperz87 2be8011
Merge remote-tracking branch 'upstream/main'
Temperz87 e06361b
Merge remote-tracking branch 'origin/main'
Temperz87 86b6eae
I blame the formatter for this one but it's probably my fault
Temperz87 c0b7fc1
Format
Temperz87 957b350
Format
Temperz87 c1d1417
Merge branch 'main' into main
RKSimon 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -544,7 +544,7 @@ _mm_maddubs_pi16(__m64 __a, __m64 __b) { | |
/// A 128-bit vector of [8 x i16] containing one of the source operands. | ||
/// \returns A 128-bit vector of [8 x i16] containing the rounded and scaled | ||
/// products of both operands. | ||
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_mulhrs_epi16(__m128i __a, | ||
static __inline__ __m128i __DEFAULT_FN_ATTRS_CONSTEXPR _mm_mulhrs_epi16(__m128i __a, | ||
__m128i __b) { | ||
|
||
return (__m128i)__builtin_ia32_pmulhrsw128((__v8hi)__a, (__v8hi)__b); | ||
} | ||
|
@@ -563,11 +563,10 @@ static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_mulhrs_epi16(__m128i __a, | |
/// A 64-bit vector of [4 x i16] containing one of the source operands. | ||
/// \returns A 64-bit vector of [4 x i16] containing the rounded and scaled | ||
/// products of both operands. | ||
static __inline__ __m64 __DEFAULT_FN_ATTRS | ||
_mm_mulhrs_pi16(__m64 __a, __m64 __b) | ||
{ | ||
return __trunc64(__builtin_ia32_pmulhrsw128((__v8hi)__anyext128(__a), | ||
(__v8hi)__anyext128(__b))); | ||
static __inline__ __m64 __DEFAULT_FN_ATTRS_CONSTEXPR | ||
_mm_mulhrs_pi16(__m64 __a, __m64 __b) { | ||
return __trunc64(__builtin_ia32_pmulhrsw128((__v8hi)__zext128(__a), | ||
(__v8hi)__zext128(__b))); | ||
} | ||
|
||
/// Copies the 8-bit integers from a 128-bit integer vector to the | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.