Skip to content

[JIT] X64 Fix - Handle 'imul' instruction variants to determine if a register was written to - #85610

Merged
TIHan merged 2 commits into
dotnet:mainfrom
TIHan:85602-fix
May 2, 2023
Merged

TIHan merged 2 commits into
dotnet:mainfrom
TIHan:85602-fix

Conversation

@TIHan

@TIHan TIHan commented May 1, 2023 •

Copy link
Copy Markdown
Contributor

Resolves #85602

There were imul variants that refer to which register is implicitly being written to. We needed to handle these cases for emitIsInstrWritingToReg.

Local diffs - Windows x64:
-60 bytes improvement
No regressions.

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 1, 2023
@ghost ghost assigned TIHan May 1, 2023
@ghost

ghost commented May 1, 2023

Copy link
Copy Markdown

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

Issue Details

Resolves #85602

There imul variants that refer to which register is implicitly being written to. We needed to handle these cases for emitIsInstrWritingToReg.

Author: TIHan
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

Comment thread src/coreclr/jit/emitxarch.cpp Resolved
@TIHan

TIHan commented May 1, 2023

Copy link
Copy Markdown
Contributor Author

@dotnet/jit-contrib ready - just need a sign-off - diffs

@jakobbotsch jakobbotsch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why does it result in improvements?

@TIHan

TIHan commented May 2, 2023 •

Copy link
Copy Markdown
Contributor Author

The peephole optimization for mov elimination caught a few more cases since we accurately know if a register was being written to for imul.

@TIHan
TIHan merged commit 2b10953 into dotnet:main May 2, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jun 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

[Fuzzlyn] Failure for complex expression

3 participants