Skip to content

Prioritize setTgtPref for the op1 use#128333

Closed
tannergooding wants to merge 2 commits into
dotnet:mainfrom
tannergooding:setTgtPref
Closed

Prioritize setTgtPref for the op1 use#128333
tannergooding wants to merge 2 commits into
dotnet:mainfrom
tannergooding:setTgtPref

Conversation

@tannergooding
Copy link
Copy Markdown
Member

@tannergooding tannergooding commented May 18, 2026

Checking TP/CQ for a case that BuildSelect indicates produces much better codegen.

Copilot AI review requested due to automatic review settings May 18, 2026 17:18
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 18, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

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 adjusts CoreCLR JIT LSRA target-preference handling, aiming to make the first preferred operand dominate register selection and changing xarch select handling.

Changes:

  • Reorders setTgtPref calls in BuildDef.
  • Removes xarch BuildSelect suppression that previously ignored the false operand as a target preference.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/coreclr/jit/lsraxarch.cpp Updates xarch select target-preference behavior.
src/coreclr/jit/lsrabuild.cpp Changes target-preference application order during def construction.

Comment thread src/coreclr/jit/lsrabuild.cpp Outdated
Comment thread src/coreclr/jit/lsraxarch.cpp
Copilot AI review requested due to automatic review settings May 18, 2026 22:16
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

@@ -967,13 +967,6 @@ int LinearScan::BuildSelect(GenTreeOp* select)
srcCount++;
@@ -967,13 +967,6 @@ int LinearScan::BuildSelect(GenTreeOp* select)
srcCount++;
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