-
Notifications
You must be signed in to change notification settings - Fork 5k
Remove unwanted ternary node in lowering #115584
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
Conversation
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.
Pull Request Overview
This PR addresses issue #115488 by removing an unwanted ternary node during the JIT lowering phase. Key changes include:
- Adding a regression test project and source file to exercise the affected hardware intrinsic logic.
- Modifying the lowering logic in lowerxarch.cpp to remove unnecessary nodes.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/tests/JIT/Regression/JitBlue/Runtime_115488.csproj | New test project file to build the regression case |
src/tests/JIT/Regression/JitBlue/Runtime_115488.cs | New test case invoking Avx512F.TernaryLogic to reproduce the issue |
src/coreclr/jit/lowerxarch.cpp | Updated lowering logic: removed unused nodes to fix the ternary node issue |
Comments suppressed due to low confidence (1)
src/coreclr/jit/lowerxarch.cpp:4130
- Verify that removing 'node' and returning 'node->gtNext' maintains the intended control flow without unintended side effects in later phases.
BlockRange().Remove(node);
src/coreclr/jit/lowerxarch.cpp
Outdated
@@ -4052,6 +4052,7 @@ GenTree* Lowering::LowerHWIntrinsicTernaryLogic(GenTreeHWIntrinsic* node) | |||
replacementNode = comp->gtNewAllBitsSetConNode(simdType); | |||
} | |||
|
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.
[nitpick] Consider adding an inline comment explaining why 'op4' is removed to help future maintainers understand its necessity.
// Remove op4 as it is not used in this scenario and does not contribute to the result. |
Copilot uses AI. Check for mistakes.
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
superpmi-diff is timing out for tpdiff. |
Fixes: #115488