JIT: Fold constant access to [ReadOnly]Span<T> especially for char and byte #64823
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
help wanted
[up-for-grabs] Good issue for external contributors
Milestone
In order to be able to declare unrolling rules in pure C# the way it was proposed in #64821 for strings we need to be able to fold this in JIT:
Both
Test1
andTest2
has to be folded to constants.Ideally we should be able to also handle spans of bytes (utf8)
Also, fold constant accesses to RVA data (from #64612). Example:
Current codegen:
Expected codegen:
NOTES:
"hello"[2]
(seefgMorphArrayIndex
)ROS<any primitive> = RVA
, not justbyte/bool
as it is currentlygetArrayInitializationData
is enoughThe text was updated successfully, but these errors were encountered: