Avoid combining conditional select for reduction instrinsics#107207
Avoid combining conditional select for reduction instrinsics#107207amanasifkhalid merged 4 commits intodotnet:mainfrom
Conversation
|
Added a few conditional select tests for reduction intrinsics. Passes all stress tests. |
src/tests/JIT/Regression/JitBlue/Runtime_106868/Runtime_106868.cs
Outdated
Show resolved
Hide resolved
src/tests/JIT/Regression/JitBlue/Runtime_106868/Runtime_106868.cs
Outdated
Show resolved
Hide resolved
a74nh
left a comment
There was a problem hiding this comment.
LGTM. Happy we've got the extra template testing added too.
amanasifkhalid
left a comment
There was a problem hiding this comment.
LGTM too. Thanks!
| // when the nestedOp is a reduce operation. | ||
|
|
||
| if (nestedOp1->IsMaskAllBitsSet() && | ||
| if (nestedOp1->IsMaskAllBitsSet() && !HWIntrinsicInfo::IsReduceOperation(nestedOp2Id) && |
There was a problem hiding this comment.
The reduction operations are notably a case where the pattern we want is somewhat inversed.
Rather than CndSel(mask, Op(value), merge) we want to instead want to check for Op(CndSel(mask, value, zero)) or similar.
We should have a tracking issue to ensure that happens for .NET 10
|
@amanasifkhalid - any reason why this was not backported to release/9.0? |
|
@kunalspathak sorry I missed this one -- I'll kick off the backport now |
|
/backport to release/9.0 |
|
Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/10820916154 |
|
@amanasifkhalid backporting to release/9.0 failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Avoid combining conditional select for reduction instrinsics
Using index info to reconstruct a base tree...
M src/coreclr/jit/hwintrinsic.h
M src/coreclr/jit/hwintrinsiclistarm64sve.h
M src/coreclr/jit/lowerarmarch.cpp
M src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs
Falling back to patching base and 3-way merge...
Auto-merging src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs
Auto-merging src/coreclr/jit/lowerarmarch.cpp
CONFLICT (content): Merge conflict in src/coreclr/jit/lowerarmarch.cpp
Auto-merging src/coreclr/jit/hwintrinsiclistarm64sve.h
Auto-merging src/coreclr/jit/hwintrinsic.h
CONFLICT (content): Merge conflict in src/coreclr/jit/hwintrinsic.h
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Avoid combining conditional select for reduction instrinsics
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
|
@amanasifkhalid an error occurred while backporting to release/9.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
Fixes #106868
Fixes #106871
Fixes #106872
@a74nh @kunalspathak @dotnet/arm64-contrib @arch-arm64-sve @TIHan @amanasifkhalid