Skip to content

Conversation

@TIHan
Copy link
Contributor

@TIHan TIHan commented Feb 10, 2023

When we handle CEE_INITOBJ in the importer, if we know that the type is a simd type, then construct a VecCon(0) for the zero-initialization instead of an IntCon(0).

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 10, 2023
@ghost
Copy link

ghost commented Feb 10, 2023

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

Issue Details

When handle CEE_INITOBJ in the importer, if we know that the type is a simd type, then constructor a VecCon(0) for the zero-initialization instead of an IntCon(0).

Author: TIHan
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@ghost ghost assigned TIHan Feb 10, 2023
@TIHan
Copy link
Contributor Author

TIHan commented Feb 14, 2023

@dotnet/jit-contrib this is ready. cc @tannergooding @kunalspathak

A few improvements

Copy link
Contributor

@SingleAccretion SingleAccretion left a comment

Choose a reason for hiding this comment

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

I think it is great to make the zero-init form for vectors canonical with CNS_VEC, but we should make this change everywhere and fully disallow ASG(simd, CNS_INT 0). This will allow for some code simplification (e. g. in VN, or the recent local morph fix).

@TIHan
Copy link
Contributor Author

TIHan commented Feb 14, 2023

we should make this change everywhere and fully disallow ASG(simd, CNS_INT 0)

I agree, we will make another PR to handle it. @tannergooding knows of the several places to do this so I'll let him handle it.

@TIHan TIHan changed the title On importing a CEE_INITOBJ for a simd, construct a VecCon(0) [JIT] On importing a CEE_INITOBJ for a simd, construct a VecCon(0) Feb 14, 2023
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.

LGTM. I think we should have an issue tracking the other cleanup so we can get to the desired outcome of no more ASG(SIMD, 0)

@TIHan
Copy link
Contributor Author

TIHan commented Feb 22, 2023

@dotnet/jit-contrib this is ready PTAL @jakobbotsch

@TIHan TIHan merged commit c1abf87 into dotnet:main Feb 23, 2023
@TIHan TIHan deleted the imp-initobj-simd branch February 23, 2023 22:22
@ghost ghost locked as resolved and limited conversation to collaborators Mar 26, 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.

4 participants