Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Dump more info in JitDump for HWIHNTRINSIC nodes #115255

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
merged 1 commit into from
May 3, 2025

Conversation

BruceForstall
Copy link
Member

In particular, dump gtSimdSize and gtAuxiliaryJitType.

Example:

old:
HWINTRINSIC simd64 long InsertVector128
HWINTRINSIC mask   long ConvertVectorToMask

new:
HWINTRINSIC simd64 64 long InsertVector128
HWINTRINSIC mask   64 long ConvertVectorToMask

In particular, dump `gtSimdSize` and `gtAuxiliaryJitType`.

Example:
```
old:
HWINTRINSIC simd64 long InsertVector128
HWINTRINSIC mask   long ConvertVectorToMask

new:
HWINTRINSIC simd64 64 long InsertVector128
HWINTRINSIC mask   64 long ConvertVectorToMask
```
@Copilot Copilot AI review requested due to automatic review settings May 2, 2025 22:45
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 2, 2025
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@BruceForstall
Copy link
Member Author

I found this useful when debugging a recent issue.

@tannergooding @dotnet/jit-contrib

Copy link
Contributor

@Copilot Copilot AI left a 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 enhances the JitDump output for HWIHNTRINSIC nodes by including additional details (gtSimdSize and gtAuxiliaryJitType) to the debug printout.

  • Added printing of the SIMD size before the intrinsic type name.
  • Conditionally prints the SIMD base type and auxiliary type (if available) in a formatted manner.

if (tree->OperIs(GT_HWINTRINSIC))
{
GenTreeHWIntrinsic* node = tree->AsHWIntrinsic();
printf(" %u", node->GetSimdSize());
Copy link
Preview

Copilot AI May 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider combining the multiple printf calls into a single call to improve code readability and reduce potential overhead.

Copilot uses AI. Check for mistakes.

? ""
: varTypeName(tree->AsHWIntrinsic()->GetSimdBaseType()),
HWIntrinsicInfo::lookupName(tree->AsHWIntrinsic()->GetHWIntrinsicId()));
printf(" (aux %s)", varTypeName(node->GetAuxiliaryType()));
Copy link
Preview

Copilot AI May 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Ensure that the format of printing the auxiliary type (with parentheses) is consistent with other debug outputs; consider adding a comment to clarify the intended formatting.

Suggested change
printf(" (aux %s)", varTypeName(node->GetAuxiliaryType()));
// Print the auxiliary type without parentheses for consistency with other debug outputs.
printf(" aux %s", varTypeName(node->GetAuxiliaryType()));

Copilot uses AI. Check for mistakes.

@BruceForstall
Copy link
Member Author

/ba-g unrelated failures

@BruceForstall BruceForstall merged commit 6a3747b into dotnet:main May 3, 2025
106 of 109 checks passed
@BruceForstall BruceForstall deleted the AddHWIntrinsicsDumping branch May 3, 2025 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants