Skip to content

Conversation

@SingleAccretion
Copy link
Contributor

@SingleAccretion SingleAccretion commented Mar 30, 2023

And fix a few issues with the support already present in lowering, in particular, start containing things under user-produced BITCASTs.

Regressions:

  1. CSE.
  2. Containment of operands of user bitcasts can sometimes interact with their containment under local stores in unfavorable ways - see the second commit's description.

Fixes #71839.

Correctness fixes:
1) The hacky way which contained indirections were handled
   will not work for targets where address containment has
   special rules that depends on the type being loaded.
2) Small-typed sources were not handled correctly.
3) Interference checks. This has some regressions attached
   to it because we now contain locals with optimizations
   disabled and that can lead to using double stores instead
   of integer ones when the user is a store itself.
@ghost ghost added 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 labels Mar 30, 2023
@ghost
Copy link

ghost commented Mar 30, 2023

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

Issue Details

And fix a few issues with the support already present in lowering, in particular, start containing things under user-produced BITCASTs.

Regressions:

  1. CSE.
  2. Containment of operands of user bitcasts can sometimes interact with their containment under local stores in unfavorable ways, in particular (see the second commit's description).

Fixes #71839.

Author: SingleAccretion
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@EgorBo
Copy link
Member

EgorBo commented Mar 30, 2023

Optional: add constant folding for GT_BITCAST in importer (gtFoldConstExpr)

@SingleAccretion
Copy link
Contributor Author

add constant folding for GT_BITCAST in importer (gtFoldConstExpr)

I'll let that wait until the support for double<->long bitcasts on 32 bit is added as otherwise importer code is not simplifiable.

Diffs.

@dotnet/jit-contrib

@SingleAccretion SingleAccretion marked this pull request as ready for review March 31, 2023 16:29
@AndyAyersMS
Copy link
Member

@SingleAccretion can you resolve conflicts -- sorry it took us so long to look at this one.

@jakobbotsch jakobbotsch merged commit 17ed091 into dotnet:main Apr 11, 2023
@SingleAccretion SingleAccretion deleted the BitCast branch April 11, 2023 16:23
@ghost ghost locked as resolved and limited conversation to collaborators May 11, 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 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.

Updating lclmorph to support bitcast

4 participants