Skip to content

Conversation

saucecontrol
Copy link
Member

@saucecontrol saucecontrol commented Jul 11, 2025

This enables a pattern like Vector128.GetElement(Vector128.Create(cns, cns, ...), noncns) to emit a read directly into the data section instead of loading the CnsVec, spilling it to the stack, and indexing into it there.

This is added primarily to support a cast implementation to come in another PR.

(peeled from #116805)

@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 Jul 11, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jul 11, 2025
Copy link
Contributor

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

@saucecontrol
Copy link
Member Author

cc @tannergooding

Diffs show a couple of hits in tests, but it's not expected this is a common pattern.

re: matching this optimization for WithElement, that doesn't work because that one spills to the stack for writing -- this only helps when we can read from the data section instead of the spill.

Copy link
Member

@tannergooding tannergooding left a comment

Choose a reason for hiding this comment

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

CC. @dotnet/jit-contrib for secondary review

@tannergooding
Copy link
Member

spmi replay failure is #117550

@tannergooding
Copy link
Member

/ba-g unrelated android timeouts

@tannergooding tannergooding merged commit ede442a into dotnet:main Jul 14, 2025
114 of 118 checks passed
@saucecontrol saucecontrol deleted the getlement-const branch July 14, 2025 23:41
@github-actions github-actions bot locked and limited conversation to collaborators Aug 14, 2025
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 community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants