Skip to content
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

Implement ShuffleNative methods and optimise Shuffle for non-constant indices #99596

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
95b8eb8
Squash into 1 commit
hamarb123 Aug 6, 2024
57e4884
Remove internal dependency on ShuffleUnsafe's behaviour wrt high bit
hamarb123 Aug 6, 2024
b9be44e
Optimise some codegen
hamarb123 Aug 7, 2024
1423e85
jit format
hamarb123 Aug 7, 2024
ff76287
jit format
hamarb123 Aug 7, 2024
ca1a5fa
Simplify logic for using Shuffle for ShuffleUnsafe
hamarb123 Aug 7, 2024
d64cad2
Merge branch 'main' into main12
hamarb123 Aug 19, 2024
bb974ca
Merge branch 'main' into main12
hamarb123 Sep 10, 2024
c1ff983
Merge branch 'main' into main12
hamarb123 Nov 13, 2024
7062967
Merge branch 'main' into main12
hamarb123 Jan 16, 2025
1c06b5d
Move `ShuffleUnsafeModified` out of `Base64Helper`
hamarb123 Jan 21, 2025
91f3a1c
Remove unnecessary `CompExactlyDependsOn` and `using`s
hamarb123 Jan 21, 2025
05e991d
Update SearchValues.cs
hamarb123 Jan 21, 2025
9d00885
Merge branch 'main' into main12
hamarb123 Jan 22, 2025
c5ca4e2
Support AVX-512/AVX-10.1 acceleration of Shuffle V128<ulong/long/double>
hamarb123 Jan 22, 2025
fc4b8f5
Additional optimisation for V512 constant index shuffle
hamarb123 Jan 22, 2025
9437603
jit format & typo
hamarb123 Jan 22, 2025
f381cf0
Fix operand order
hamarb123 Jan 22, 2025
f32bf01
Changes to `IsValidForShuffle` & jit format
hamarb123 Jan 22, 2025
5c4ba29
jit format
hamarb123 Jan 22, 2025
70e68b2
Update hwintrinsicxarch.cpp
hamarb123 Jan 22, 2025
eacf11a
Update hwintrinsicxarch.cpp
hamarb123 Jan 22, 2025
98a3e61
Update gentree.cpp
hamarb123 Jan 23, 2025
a35768c
Make `op2DupSafe` be consistently ordered
hamarb123 Jan 23, 2025
036263b
jit format
hamarb123 Jan 23, 2025
a4a6365
Use `compIsEvexOpportunisticallySupported` instead of explicit AVX-10…
hamarb123 Jan 23, 2025
39fda9c
jit format
hamarb123 Jan 23, 2025
89fc050
Update gentree.cpp
hamarb123 Jan 24, 2025
8683e8a
Update Vector128.cs
hamarb123 Jan 24, 2025
6950dfa
Use `BlockNonDeterministicIntrinsics` instead of `CompExactlyDependsOn`
hamarb123 Jan 24, 2025
26d68df
Ensure V128<byte> ShuffleUnsafe is not regressed on mono
hamarb123 Jan 24, 2025
1044d8e
Update gentree.cpp
hamarb123 Jan 24, 2025
85d9b46
Rename `ShuffleUnsafe` to `ShuffleNative`
hamarb123 Jan 28, 2025
0dffb6e
jit format
hamarb123 Jan 28, 2025
33d9b4d
jit format again
hamarb123 Jan 28, 2025
81fe049
um
hamarb123 Jan 28, 2025
912596e
Move assertion on arm64 to correct spot
hamarb123 Jan 29, 2025
d58e1be
Normalize indices for `vpshufb` in all cases of constant indices Shuffle
hamarb123 Jan 29, 2025
2e9ef8a
jit format
hamarb123 Jan 29, 2025
7657a97
Revert last pair of commits
hamarb123 Jan 29, 2025
690d8f8
Feedback
hamarb123 Jan 29, 2025
6aed6f0
Merge branch 'main' into main12
tannergooding Mar 2, 2025
d87cec8
Address some feedback & a bug fix
hamarb123 Mar 2, 2025
363ae94
Ensure ShuffleNative's behaviour with reflection/function pointers/et…
hamarb123 Mar 2, 2025
01d88c4
jit format & compilation error
hamarb123 Mar 2, 2025
40e772f
jit format & fix buuld
hamarb123 Mar 3, 2025
1d963d3
jit format & fix build
hamarb123 Mar 3, 2025
57bd410
jit format
hamarb123 Mar 3, 2025
241e462
Update hwintrinsicxarch.cpp
hamarb123 Mar 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -3345,11 +3345,19 @@ class Compiler
GenTree* gtNewSimdRoundNode(
var_types type, GenTree* op1, CorInfoType simdBaseJitType, unsigned simdSize);

GenTree* gtNewSimdShuffleVariableNode(var_types type,
GenTree* op1,
GenTree* op2,
CorInfoType simdBaseJitType,
unsigned simdSize,
bool isShuffleNative);

GenTree* gtNewSimdShuffleNode(var_types type,
GenTree* op1,
GenTree* op2,
CorInfoType simdBaseJitType,
unsigned simdSize);
unsigned simdSize,
bool isShuffleNative);

GenTree* gtNewSimdSqrtNode(
var_types type, GenTree* op1, CorInfoType simdBaseJitType, unsigned simdSize);
Expand Down Expand Up @@ -4674,7 +4682,11 @@ class Compiler
bool mustExpand);

#ifdef FEATURE_HW_INTRINSICS
bool IsValidForShuffle(GenTreeVecCon* vecCon, unsigned simdSize, var_types simdBaseType) const;
bool IsValidForShuffle(GenTree* indices,
unsigned simdSize,
var_types simdBaseType,
bool* canBecomeValid,
bool isShuffleNative) const;

GenTree* impHWIntrinsic(NamedIntrinsic intrinsic,
CORINFO_CLASS_HANDLE clsHnd,
Expand Down
Loading
Loading