Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JitDiff X64] xtqqczze/dotnet-runtime/remove-uint-cast2 #829

Open
MihuBot opened this issue Dec 15, 2024 · 3 comments
Open

[JitDiff X64] xtqqczze/dotnet-runtime/remove-uint-cast2 #829

MihuBot opened this issue Dec 15, 2024 · 3 comments

Comments

@MihuBot
Copy link
Owner

MihuBot commented Dec 15, 2024

Job completed in 14 minutes 13 seconds.

Diffs

Diffs
Found 264 files with textual diffs.

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 40203552
Total bytes of diff: 40203797
Total bytes of delta: 245 (0.00 % of base)
Total relative delta: 2.42
    diff is a regression.
    relative diff is a regression.


Top file regressions (bytes):
         245 : System.Runtime.Numerics.dasm (0.20 % of base)

1 total files with Code Size differences (0 improved, 1 regressed), 258 unchanged.

Top method regressions (bytes):
          31 (30.39 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[double]:AppendSpan(int):System.Span`1[double]:this (FullOpts)
          31 (30.39 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[int]:AppendSpan(int):System.Span`1[int]:this (FullOpts)
          31 (30.39 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[long]:AppendSpan(int):System.Span`1[long]:this (FullOpts)
          31 (30.39 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[short]:AppendSpan(int):System.Span`1[short]:this (FullOpts)
          31 (30.39 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[System.Nullable`1[int]]:AppendSpan(int):System.Span`1[System.Nullable`1[int]]:this (FullOpts)
          30 (28.85 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[System.__Canon]:AppendSpan(int):System.Span`1[System.__Canon]:this (FullOpts)
          30 (30.00 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[System.Numerics.Vector`1[float]]:AppendSpan(int):System.Span`1[System.Numerics.Vector`1[float]]:this (FullOpts)
          30 (31.25 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[ubyte]:AppendSpan(int):System.Span`1[ubyte]:this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[double]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[int]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[long]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[short]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[System.__Canon]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[System.Nullable`1[int]]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[System.Numerics.Vector`1[float]]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[ubyte]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[double]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[int]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[long]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[short]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[System.__Canon]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[System.Nullable`1[int]]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[System.Numerics.Vector`1[float]]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[ubyte]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)

Top method improvements (bytes):
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[double]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[int]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[long]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[short]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[System.__Canon]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[System.Nullable`1[int]]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[System.Numerics.Vector`1[float]]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[ubyte]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[double]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[int]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[long]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[short]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[System.__Canon]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[System.Nullable`1[int]]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[System.Numerics.Vector`1[float]]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.12 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[ubyte]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)

Top method regressions (percentages):
          30 (31.25 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[ubyte]:AppendSpan(int):System.Span`1[ubyte]:this (FullOpts)
          31 (30.39 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[double]:AppendSpan(int):System.Span`1[double]:this (FullOpts)
          31 (30.39 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[int]:AppendSpan(int):System.Span`1[int]:this (FullOpts)
          31 (30.39 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[long]:AppendSpan(int):System.Span`1[long]:this (FullOpts)
          31 (30.39 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[short]:AppendSpan(int):System.Span`1[short]:this (FullOpts)
          31 (30.39 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[System.Nullable`1[int]]:AppendSpan(int):System.Span`1[System.Nullable`1[int]]:this (FullOpts)
          30 (30.00 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[System.Numerics.Vector`1[float]]:AppendSpan(int):System.Span`1[System.Numerics.Vector`1[float]]:this (FullOpts)
          30 (28.85 % of base) : System.Runtime.Numerics.dasm - System.Collections.Generic.ValueListBuilder`1[System.__Canon]:AppendSpan(int):System.Span`1[System.__Canon]:this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[ubyte]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[ubyte]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[short]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[short]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[double]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[int]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[long]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[System.Nullable`1[int]]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[System.Numerics.Vector`1[float]]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[double]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[int]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[long]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[System.Nullable`1[int]]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[System.Numerics.Vector`1[float]]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[System.__Canon]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
           1 (0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[System.__Canon]:.ctor(System.Array,System.ReadOnlySpan`1[int],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)

Top method improvements (percentages):
          -1 (-0.12 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[ubyte]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[short]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[double]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[int]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[long]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[System.Nullable`1[int]]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[System.Numerics.Vector`1[float]]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[ubyte]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[short]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[double]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[int]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[long]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[System.Nullable`1[int]]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[System.Numerics.Vector`1[float]]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.TensorSpan`1[System.__Canon]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
          -1 (-0.11 % of base) : System.Numerics.Tensors.dasm - System.Numerics.Tensors.ReadOnlyTensorSpan`1[System.__Canon]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)

40 total methods with Code Size differences (16 improved, 24 regressed), 232894 unchanged.

--------------------------------------------------------------------------------

Artifacts:

xtqqczze referenced this issue in xtqqczze/dotnet-runtime Dec 15, 2024
@MihuBot
Copy link
Owner Author

MihuBot commented Dec 15, 2024

Top method regressions

31 (30.39 % of base) - System.Collections.Generic.ValueListBuilder`1[double]:AppendSpan(int):System.Span`1[double]:this
 ; Assembly listing for method System.Collections.Generic.ValueListBuilder`1[double]:AppendSpan(int):System.Span`1[double]:this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX512 - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; partially interruptible
 ; No PGO data
 ; 0 inlinees with PGO data; 1 single block inlinees; 1 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 this         [V00,T00] (  7,  6   )   byref  ->  rdi         this single-def
 ;  V01 arg1         [V01,T01] (  6,  4.50)     int  ->  rsi         single-def
 ;  V02 loc0         [V02,T02] (  4,  3   )     int  ->  rbx        
 ;* V03 loc1         [V03    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op <System.Span`1[double]>
 ;# V04 OutArgs      [V04    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V05 tmp1         [V05    ] (  0,  0   )  struct (16) zero-ref    do-not-enreg[SBR] multireg-ret "Return value temp for multireg return" <System.Span`1[double]>
 ;* V06 tmp2         [V06    ] (  0,  0   )  struct (16) zero-ref    multireg-ret ld-addr-op "NewObj constructor temp" <System.Span`1[double]>
 ;* V07 tmp3         [V07    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
-;  V08 tmp4         [V08,T04] (  2,  1.50)   byref  ->  r15         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
-;  V09 tmp5         [V09,T03] (  2,  2   )     int  ->  rax         "field V03._length (fldOffset=0x8)" P-INDEP
+;  V08 tmp4         [V08,T05] (  2,  1.50)   byref  ->  r15         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
+;  V09 tmp5         [V09,T03] (  3,  2.50)     int  ->  r14         "field V03._length (fldOffset=0x8)" P-INDEP
 ;* V10 tmp6         [V10    ] (  0,  0   )   byref  ->  zero-ref    "field V05._reference (fldOffset=0x0)" P-DEP
 ;* V11 tmp7         [V11    ] (  0,  0   )     int  ->  zero-ref    "field V05._length (fldOffset=0x8)" P-DEP
-;  V12 tmp8         [V12,T05] (  2,  1   )   byref  ->  rax         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
-;  V13 tmp9         [V13,T06] (  2,  1   )     int  ->  rsi         "field V06._length (fldOffset=0x8)" P-INDEP
-;  V14 tmp10        [V14,T07] (  2,  1   )  struct (16) [rbp-0x20]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[double]>
+;  V12 tmp8         [V12,T06] (  2,  1   )   byref  ->  rax         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
+;  V13 tmp9         [V13,T07] (  2,  1   )     int  ->  rsi         "field V06._length (fldOffset=0x8)" P-INDEP
+;  V14 tmp10        [V14,T08] (  2,  1   )  struct (16) [rbp-0x28]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[double]>
+;  V15 cse0         [V15,T04] (  3,  2.50)    long  ->  rax         "CSE #03: aggressive"
 ;
-; Lcl frame size = 16
+; Lcl frame size = 24
 
 G_M9862_IG01:
        push     rbp
        push     r15
+       push     r14
        push     rbx
-       sub      rsp, 16
-       lea      rbp, [rsp+0x20]
+       sub      rsp, 24
+       lea      rbp, [rsp+0x30]
        xor      eax, eax
-       mov      qword ptr [rbp-0x20], rax
-						;; size=19 bbWeight=1 PerfScore 5.00
+       mov      qword ptr [rbp-0x28], rax
+						;; size=21 bbWeight=1 PerfScore 6.00
 G_M9862_IG02:
        mov      ebx, dword ptr [rdi+0x08]
        mov      r15, bword ptr [rdi+0x10]
-       mov      eax, dword ptr [rdi+0x18]
-       mov      ecx, ebx
-       mov      edx, esi
-       add      rcx, rdx
-       cmp      rcx, rax
+       mov      r14d, dword ptr [rdi+0x18]
+       mov      eax, ebx
+       mov      ecx, esi
+       add      rax, rcx
+       mov      ecx, r14d
+       cmp      rax, rcx
        jbe      SHORT G_M9862_IG05
-						;; size=22 bbWeight=1 PerfScore 8.00
+						;; size=26 bbWeight=1 PerfScore 8.25
 G_M9862_IG03:
        mov      rax, 0xD1FFAB1E      ; code for System.Collections.Generic.ValueListBuilder`1[double]:AppendSpanWithGrow(int):System.Span`1[double]:this
        call     [rax]System.Collections.Generic.ValueListBuilder`1[double]:AppendSpanWithGrow(int):System.Span`1[double]:this
-       mov      bword ptr [rbp-0x20], rax
-       mov      qword ptr [rbp-0x18], rdx
-       mov      rax, bword ptr [rbp-0x20]
-       mov      rdx, qword ptr [rbp-0x18]
+       mov      bword ptr [rbp-0x28], rax
+       mov      qword ptr [rbp-0x20], rdx
+       mov      rax, bword ptr [rbp-0x28]
+       mov      rdx, qword ptr [rbp-0x20]
 						;; size=28 bbWeight=0.50 PerfScore 3.62
 G_M9862_IG04:
-       add      rsp, 16
+       add      rsp, 24
        pop      rbx
+       pop      r14
        pop      r15
        pop      rbp
        ret      
-						;; size=9 bbWeight=0.50 PerfScore 1.38
+						;; size=11 bbWeight=0.50 PerfScore 1.62
 G_M9862_IG05:
-       lea      eax, [rbx+rsi]
-       mov      dword ptr [rdi+0x08], eax
+       lea      edx, [rbx+rsi]
+       mov      dword ptr [rdi+0x08], edx
+       mov      edx, r14d
+       cmp      rax, rdx
+       ja       SHORT G_M9862_IG07
        mov      eax, ebx
        lea      rax, bword ptr [r15+8*rax]
        mov      rdx, rsi
-						;; size=15 bbWeight=0.50 PerfScore 1.25
+						;; size=23 bbWeight=0.50 PerfScore 2.00
 G_M9862_IG06:
-       add      rsp, 16
+       add      rsp, 24
        pop      rbx
+       pop      r14
        pop      r15
        pop      rbp
        ret      
-						;; size=9 bbWeight=0.50 PerfScore 1.38
+						;; size=11 bbWeight=0.50 PerfScore 1.62
+G_M9862_IG07:
+       mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       int3     
+						;; size=13 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 102, prolog size 19, PerfScore 20.62, instruction count 36, allocated bytes for code 102 (MethodHash=b075d979) for method System.Collections.Generic.ValueListBuilder`1[double]:AppendSpan(int):System.Span`1[double]:this (FullOpts)
+; Total bytes of code 133, prolog size 21, PerfScore 23.12, instruction count 46, allocated bytes for code 133 (MethodHash=b075d979) for method System.Collections.Generic.ValueListBuilder`1[double]:AppendSpan(int):System.Span`1[double]:this (FullOpts)
 ; ============================================================
31 (30.39 % of base) - System.Collections.Generic.ValueListBuilder`1[int]:AppendSpan(int):System.Span`1[int]:this
 ; Assembly listing for method System.Collections.Generic.ValueListBuilder`1[int]:AppendSpan(int):System.Span`1[int]:this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX512 - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; partially interruptible
 ; No PGO data
 ; 0 inlinees with PGO data; 1 single block inlinees; 1 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 this         [V00,T00] (  7,  6   )   byref  ->  rdi         this single-def
 ;  V01 arg1         [V01,T01] (  6,  4.50)     int  ->  rsi         single-def
 ;  V02 loc0         [V02,T02] (  4,  3   )     int  ->  rbx        
 ;* V03 loc1         [V03    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op <System.Span`1[int]>
 ;# V04 OutArgs      [V04    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V05 tmp1         [V05    ] (  0,  0   )  struct (16) zero-ref    do-not-enreg[SBR] multireg-ret "Return value temp for multireg return" <System.Span`1[int]>
 ;* V06 tmp2         [V06    ] (  0,  0   )  struct (16) zero-ref    multireg-ret ld-addr-op "NewObj constructor temp" <System.Span`1[int]>
 ;* V07 tmp3         [V07    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
-;  V08 tmp4         [V08,T04] (  2,  1.50)   byref  ->  r15         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
-;  V09 tmp5         [V09,T03] (  2,  2   )     int  ->  rax         "field V03._length (fldOffset=0x8)" P-INDEP
+;  V08 tmp4         [V08,T05] (  2,  1.50)   byref  ->  r15         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
+;  V09 tmp5         [V09,T03] (  3,  2.50)     int  ->  r14         "field V03._length (fldOffset=0x8)" P-INDEP
 ;* V10 tmp6         [V10    ] (  0,  0   )   byref  ->  zero-ref    "field V05._reference (fldOffset=0x0)" P-DEP
 ;* V11 tmp7         [V11    ] (  0,  0   )     int  ->  zero-ref    "field V05._length (fldOffset=0x8)" P-DEP
-;  V12 tmp8         [V12,T05] (  2,  1   )   byref  ->  rax         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
-;  V13 tmp9         [V13,T06] (  2,  1   )     int  ->  rsi         "field V06._length (fldOffset=0x8)" P-INDEP
-;  V14 tmp10        [V14,T07] (  2,  1   )  struct (16) [rbp-0x20]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[int]>
+;  V12 tmp8         [V12,T06] (  2,  1   )   byref  ->  rax         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
+;  V13 tmp9         [V13,T07] (  2,  1   )     int  ->  rsi         "field V06._length (fldOffset=0x8)" P-INDEP
+;  V14 tmp10        [V14,T08] (  2,  1   )  struct (16) [rbp-0x28]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[int]>
+;  V15 cse0         [V15,T04] (  3,  2.50)    long  ->  rax         "CSE #03: aggressive"
 ;
-; Lcl frame size = 16
+; Lcl frame size = 24
 
 G_M13542_IG01:
        push     rbp
        push     r15
+       push     r14
        push     rbx
-       sub      rsp, 16
-       lea      rbp, [rsp+0x20]
+       sub      rsp, 24
+       lea      rbp, [rsp+0x30]
        xor      eax, eax
-       mov      qword ptr [rbp-0x20], rax
-						;; size=19 bbWeight=1 PerfScore 5.00
+       mov      qword ptr [rbp-0x28], rax
+						;; size=21 bbWeight=1 PerfScore 6.00
 G_M13542_IG02:
        mov      ebx, dword ptr [rdi+0x08]
        mov      r15, bword ptr [rdi+0x10]
-       mov      eax, dword ptr [rdi+0x18]
-       mov      ecx, ebx
-       mov      edx, esi
-       add      rcx, rdx
-       cmp      rcx, rax
+       mov      r14d, dword ptr [rdi+0x18]
+       mov      eax, ebx
+       mov      ecx, esi
+       add      rax, rcx
+       mov      ecx, r14d
+       cmp      rax, rcx
        jbe      SHORT G_M13542_IG05
-						;; size=22 bbWeight=1 PerfScore 8.00
+						;; size=26 bbWeight=1 PerfScore 8.25
 G_M13542_IG03:
        mov      rax, 0xD1FFAB1E      ; code for System.Collections.Generic.ValueListBuilder`1[int]:AppendSpanWithGrow(int):System.Span`1[int]:this
        call     [rax]System.Collections.Generic.ValueListBuilder`1[int]:AppendSpanWithGrow(int):System.Span`1[int]:this
-       mov      bword ptr [rbp-0x20], rax
-       mov      qword ptr [rbp-0x18], rdx
-       mov      rax, bword ptr [rbp-0x20]
-       mov      rdx, qword ptr [rbp-0x18]
+       mov      bword ptr [rbp-0x28], rax
+       mov      qword ptr [rbp-0x20], rdx
+       mov      rax, bword ptr [rbp-0x28]
+       mov      rdx, qword ptr [rbp-0x20]
 						;; size=28 bbWeight=0.50 PerfScore 3.62
 G_M13542_IG04:
-       add      rsp, 16
+       add      rsp, 24
        pop      rbx
+       pop      r14
        pop      r15
        pop      rbp
        ret      
-						;; size=9 bbWeight=0.50 PerfScore 1.38
+						;; size=11 bbWeight=0.50 PerfScore 1.62
 G_M13542_IG05:
-       lea      eax, [rbx+rsi]
-       mov      dword ptr [rdi+0x08], eax
+       lea      edx, [rbx+rsi]
+       mov      dword ptr [rdi+0x08], edx
+       mov      edx, r14d
+       cmp      rax, rdx
+       ja       SHORT G_M13542_IG07
        mov      eax, ebx
        lea      rax, bword ptr [r15+4*rax]
        mov      rdx, rsi
-						;; size=15 bbWeight=0.50 PerfScore 1.25
+						;; size=23 bbWeight=0.50 PerfScore 2.00
 G_M13542_IG06:
-       add      rsp, 16
+       add      rsp, 24
        pop      rbx
+       pop      r14
        pop      r15
        pop      rbp
        ret      
-						;; size=9 bbWeight=0.50 PerfScore 1.38
+						;; size=11 bbWeight=0.50 PerfScore 1.62
+G_M13542_IG07:
+       mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       int3     
+						;; size=13 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 102, prolog size 19, PerfScore 20.62, instruction count 36, allocated bytes for code 102 (MethodHash=b0bbcb19) for method System.Collections.Generic.ValueListBuilder`1[int]:AppendSpan(int):System.Span`1[int]:this (FullOpts)
+; Total bytes of code 133, prolog size 21, PerfScore 23.12, instruction count 46, allocated bytes for code 133 (MethodHash=b0bbcb19) for method System.Collections.Generic.ValueListBuilder`1[int]:AppendSpan(int):System.Span`1[int]:this (FullOpts)
 ; ============================================================
31 (30.39 % of base) - System.Collections.Generic.ValueListBuilder`1[long]:AppendSpan(int):System.Span`1[long]:this
 ; Assembly listing for method System.Collections.Generic.ValueListBuilder`1[long]:AppendSpan(int):System.Span`1[long]:this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX512 - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; partially interruptible
 ; No PGO data
 ; 0 inlinees with PGO data; 1 single block inlinees; 1 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 this         [V00,T00] (  7,  6   )   byref  ->  rdi         this single-def
 ;  V01 arg1         [V01,T01] (  6,  4.50)     int  ->  rsi         single-def
 ;  V02 loc0         [V02,T02] (  4,  3   )     int  ->  rbx        
 ;* V03 loc1         [V03    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op <System.Span`1[long]>
 ;# V04 OutArgs      [V04    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V05 tmp1         [V05    ] (  0,  0   )  struct (16) zero-ref    do-not-enreg[SBR] multireg-ret "Return value temp for multireg return" <System.Span`1[long]>
 ;* V06 tmp2         [V06    ] (  0,  0   )  struct (16) zero-ref    multireg-ret ld-addr-op "NewObj constructor temp" <System.Span`1[long]>
 ;* V07 tmp3         [V07    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
-;  V08 tmp4         [V08,T04] (  2,  1.50)   byref  ->  r15         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
-;  V09 tmp5         [V09,T03] (  2,  2   )     int  ->  rax         "field V03._length (fldOffset=0x8)" P-INDEP
+;  V08 tmp4         [V08,T05] (  2,  1.50)   byref  ->  r15         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
+;  V09 tmp5         [V09,T03] (  3,  2.50)     int  ->  r14         "field V03._length (fldOffset=0x8)" P-INDEP
 ;* V10 tmp6         [V10    ] (  0,  0   )   byref  ->  zero-ref    "field V05._reference (fldOffset=0x0)" P-DEP
 ;* V11 tmp7         [V11    ] (  0,  0   )     int  ->  zero-ref    "field V05._length (fldOffset=0x8)" P-DEP
-;  V12 tmp8         [V12,T05] (  2,  1   )   byref  ->  rax         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
-;  V13 tmp9         [V13,T06] (  2,  1   )     int  ->  rsi         "field V06._length (fldOffset=0x8)" P-INDEP
-;  V14 tmp10        [V14,T07] (  2,  1   )  struct (16) [rbp-0x20]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[long]>
+;  V12 tmp8         [V12,T06] (  2,  1   )   byref  ->  rax         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
+;  V13 tmp9         [V13,T07] (  2,  1   )     int  ->  rsi         "field V06._length (fldOffset=0x8)" P-INDEP
+;  V14 tmp10        [V14,T08] (  2,  1   )  struct (16) [rbp-0x28]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[long]>
+;  V15 cse0         [V15,T04] (  3,  2.50)    long  ->  rax         "CSE #03: aggressive"
 ;
-; Lcl frame size = 16
+; Lcl frame size = 24
 
 G_M62022_IG01:
        push     rbp
        push     r15
+       push     r14
        push     rbx
-       sub      rsp, 16
-       lea      rbp, [rsp+0x20]
+       sub      rsp, 24
+       lea      rbp, [rsp+0x30]
        xor      eax, eax
-       mov      qword ptr [rbp-0x20], rax
-						;; size=19 bbWeight=1 PerfScore 5.00
+       mov      qword ptr [rbp-0x28], rax
+						;; size=21 bbWeight=1 PerfScore 6.00
 G_M62022_IG02:
        mov      ebx, dword ptr [rdi+0x08]
        mov      r15, bword ptr [rdi+0x10]
-       mov      eax, dword ptr [rdi+0x18]
-       mov      ecx, ebx
-       mov      edx, esi
-       add      rcx, rdx
-       cmp      rcx, rax
+       mov      r14d, dword ptr [rdi+0x18]
+       mov      eax, ebx
+       mov      ecx, esi
+       add      rax, rcx
+       mov      ecx, r14d
+       cmp      rax, rcx
        jbe      SHORT G_M62022_IG05
-						;; size=22 bbWeight=1 PerfScore 8.00
+						;; size=26 bbWeight=1 PerfScore 8.25
 G_M62022_IG03:
        mov      rax, 0xD1FFAB1E      ; code for System.Collections.Generic.ValueListBuilder`1[long]:AppendSpanWithGrow(int):System.Span`1[long]:this
        call     [rax]System.Collections.Generic.ValueListBuilder`1[long]:AppendSpanWithGrow(int):System.Span`1[long]:this
-       mov      bword ptr [rbp-0x20], rax
-       mov      qword ptr [rbp-0x18], rdx
-       mov      rax, bword ptr [rbp-0x20]
-       mov      rdx, qword ptr [rbp-0x18]
+       mov      bword ptr [rbp-0x28], rax
+       mov      qword ptr [rbp-0x20], rdx
+       mov      rax, bword ptr [rbp-0x28]
+       mov      rdx, qword ptr [rbp-0x20]
 						;; size=28 bbWeight=0.50 PerfScore 3.62
 G_M62022_IG04:
-       add      rsp, 16
+       add      rsp, 24
        pop      rbx
+       pop      r14
        pop      r15
        pop      rbp
        ret      
-						;; size=9 bbWeight=0.50 PerfScore 1.38
+						;; size=11 bbWeight=0.50 PerfScore 1.62
 G_M62022_IG05:
-       lea      eax, [rbx+rsi]
-       mov      dword ptr [rdi+0x08], eax
+       lea      edx, [rbx+rsi]
+       mov      dword ptr [rdi+0x08], edx
+       mov      edx, r14d
+       cmp      rax, rdx
+       ja       SHORT G_M62022_IG07
        mov      eax, ebx
        lea      rax, bword ptr [r15+8*rax]
        mov      rdx, rsi
-						;; size=15 bbWeight=0.50 PerfScore 1.25
+						;; size=23 bbWeight=0.50 PerfScore 2.00
 G_M62022_IG06:
-       add      rsp, 16
+       add      rsp, 24
        pop      rbx
+       pop      r14
        pop      r15
        pop      rbp
        ret      
-						;; size=9 bbWeight=0.50 PerfScore 1.38
+						;; size=11 bbWeight=0.50 PerfScore 1.62
+G_M62022_IG07:
+       mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       int3     
+						;; size=13 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 102, prolog size 19, PerfScore 20.62, instruction count 36, allocated bytes for code 102 (MethodHash=5c0b0db9) for method System.Collections.Generic.ValueListBuilder`1[long]:AppendSpan(int):System.Span`1[long]:this (FullOpts)
+; Total bytes of code 133, prolog size 21, PerfScore 23.12, instruction count 46, allocated bytes for code 133 (MethodHash=5c0b0db9) for method System.Collections.Generic.ValueListBuilder`1[long]:AppendSpan(int):System.Span`1[long]:this (FullOpts)
 ; ============================================================
31 (30.39 % of base) - System.Collections.Generic.ValueListBuilder`1[short]:AppendSpan(int):System.Span`1[short]:this
 ; Assembly listing for method System.Collections.Generic.ValueListBuilder`1[short]:AppendSpan(int):System.Span`1[short]:this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX512 - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; partially interruptible
 ; No PGO data
 ; 0 inlinees with PGO data; 1 single block inlinees; 1 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 this         [V00,T00] (  7,  6   )   byref  ->  rdi         this single-def
 ;  V01 arg1         [V01,T01] (  6,  4.50)     int  ->  rsi         single-def
 ;  V02 loc0         [V02,T02] (  4,  3   )     int  ->  rbx        
 ;* V03 loc1         [V03    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op <System.Span`1[short]>
 ;# V04 OutArgs      [V04    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V05 tmp1         [V05    ] (  0,  0   )  struct (16) zero-ref    do-not-enreg[SBR] multireg-ret "Return value temp for multireg return" <System.Span`1[short]>
 ;* V06 tmp2         [V06    ] (  0,  0   )  struct (16) zero-ref    multireg-ret ld-addr-op "NewObj constructor temp" <System.Span`1[short]>
 ;* V07 tmp3         [V07    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
-;  V08 tmp4         [V08,T04] (  2,  1.50)   byref  ->  r15         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
-;  V09 tmp5         [V09,T03] (  2,  2   )     int  ->  rax         "field V03._length (fldOffset=0x8)" P-INDEP
+;  V08 tmp4         [V08,T05] (  2,  1.50)   byref  ->  r15         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
+;  V09 tmp5         [V09,T03] (  3,  2.50)     int  ->  r14         "field V03._length (fldOffset=0x8)" P-INDEP
 ;* V10 tmp6         [V10    ] (  0,  0   )   byref  ->  zero-ref    "field V05._reference (fldOffset=0x0)" P-DEP
 ;* V11 tmp7         [V11    ] (  0,  0   )     int  ->  zero-ref    "field V05._length (fldOffset=0x8)" P-DEP
-;  V12 tmp8         [V12,T05] (  2,  1   )   byref  ->  rax         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
-;  V13 tmp9         [V13,T06] (  2,  1   )     int  ->  rsi         "field V06._length (fldOffset=0x8)" P-INDEP
-;  V14 tmp10        [V14,T07] (  2,  1   )  struct (16) [rbp-0x20]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[short]>
+;  V12 tmp8         [V12,T06] (  2,  1   )   byref  ->  rax         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
+;  V13 tmp9         [V13,T07] (  2,  1   )     int  ->  rsi         "field V06._length (fldOffset=0x8)" P-INDEP
+;  V14 tmp10        [V14,T08] (  2,  1   )  struct (16) [rbp-0x28]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[short]>
+;  V15 cse0         [V15,T04] (  3,  2.50)    long  ->  rax         "CSE #03: aggressive"
 ;
-; Lcl frame size = 16
+; Lcl frame size = 24
 
 G_M56006_IG01:
        push     rbp
        push     r15
+       push     r14
        push     rbx
-       sub      rsp, 16
-       lea      rbp, [rsp+0x20]
+       sub      rsp, 24
+       lea      rbp, [rsp+0x30]
        xor      eax, eax
-       mov      qword ptr [rbp-0x20], rax
-						;; size=19 bbWeight=1 PerfScore 5.00
+       mov      qword ptr [rbp-0x28], rax
+						;; size=21 bbWeight=1 PerfScore 6.00
 G_M56006_IG02:
        mov      ebx, dword ptr [rdi+0x08]
        mov      r15, bword ptr [rdi+0x10]
-       mov      eax, dword ptr [rdi+0x18]
-       mov      ecx, ebx
-       mov      edx, esi
-       add      rcx, rdx
-       cmp      rcx, rax
+       mov      r14d, dword ptr [rdi+0x18]
+       mov      eax, ebx
+       mov      ecx, esi
+       add      rax, rcx
+       mov      ecx, r14d
+       cmp      rax, rcx
        jbe      SHORT G_M56006_IG05
-						;; size=22 bbWeight=1 PerfScore 8.00
+						;; size=26 bbWeight=1 PerfScore 8.25
 G_M56006_IG03:
        mov      rax, 0xD1FFAB1E      ; code for System.Collections.Generic.ValueListBuilder`1[short]:AppendSpanWithGrow(int):System.Span`1[short]:this
        call     [rax]System.Collections.Generic.ValueListBuilder`1[short]:AppendSpanWithGrow(int):System.Span`1[short]:this
-       mov      bword ptr [rbp-0x20], rax
-       mov      qword ptr [rbp-0x18], rdx
-       mov      rax, bword ptr [rbp-0x20]
-       mov      rdx, qword ptr [rbp-0x18]
+       mov      bword ptr [rbp-0x28], rax
+       mov      qword ptr [rbp-0x20], rdx
+       mov      rax, bword ptr [rbp-0x28]
+       mov      rdx, qword ptr [rbp-0x20]
 						;; size=28 bbWeight=0.50 PerfScore 3.62
 G_M56006_IG04:
-       add      rsp, 16
+       add      rsp, 24
        pop      rbx
+       pop      r14
        pop      r15
        pop      rbp
        ret      
-						;; size=9 bbWeight=0.50 PerfScore 1.38
+						;; size=11 bbWeight=0.50 PerfScore 1.62
 G_M56006_IG05:
-       lea      eax, [rbx+rsi]
-       mov      dword ptr [rdi+0x08], eax
+       lea      edx, [rbx+rsi]
+       mov      dword ptr [rdi+0x08], edx
+       mov      edx, r14d
+       cmp      rax, rdx
+       ja       SHORT G_M56006_IG07
        mov      eax, ebx
        lea      rax, bword ptr [r15+2*rax]
        mov      rdx, rsi
-						;; size=15 bbWeight=0.50 PerfScore 1.25
+						;; size=23 bbWeight=0.50 PerfScore 2.00
 G_M56006_IG06:
-       add      rsp, 16
+       add      rsp, 24
        pop      rbx
+       pop      r14
        pop      r15
        pop      rbp
        ret      
-						;; size=9 bbWeight=0.50 PerfScore 1.38
+						;; size=11 bbWeight=0.50 PerfScore 1.62
+G_M56006_IG07:
+       mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       int3     
+						;; size=13 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 102, prolog size 19, PerfScore 20.62, instruction count 36, allocated bytes for code 102 (MethodHash=48f22539) for method System.Collections.Generic.ValueListBuilder`1[short]:AppendSpan(int):System.Span`1[short]:this (FullOpts)
+; Total bytes of code 133, prolog size 21, PerfScore 23.12, instruction count 46, allocated bytes for code 133 (MethodHash=48f22539) for method System.Collections.Generic.ValueListBuilder`1[short]:AppendSpan(int):System.Span`1[short]:this (FullOpts)
 ; ============================================================
31 (30.39 % of base) - System.Collections.Generic.ValueListBuilder`1[System.Nullable`1[int]]:AppendSpan(int):System.Span`1[System.Nullable`1[int]]:this
 ; Assembly listing for method System.Collections.Generic.ValueListBuilder`1[System.Nullable`1[int]]:AppendSpan(int):System.Span`1[System.Nullable`1[int]]:this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX512 - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; partially interruptible
 ; No PGO data
 ; 0 inlinees with PGO data; 1 single block inlinees; 1 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 this         [V00,T00] (  7,  6   )   byref  ->  rdi         this single-def
 ;  V01 arg1         [V01,T01] (  6,  4.50)     int  ->  rsi         single-def
 ;  V02 loc0         [V02,T02] (  4,  3   )     int  ->  rbx        
 ;* V03 loc1         [V03    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op <System.Span`1[System.Nullable`1[int]]>
 ;# V04 OutArgs      [V04    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V05 tmp1         [V05    ] (  0,  0   )  struct (16) zero-ref    do-not-enreg[SBR] multireg-ret "Return value temp for multireg return" <System.Span`1[System.Nullable`1[int]]>
 ;* V06 tmp2         [V06    ] (  0,  0   )  struct (16) zero-ref    multireg-ret ld-addr-op "NewObj constructor temp" <System.Span`1[System.Nullable`1[int]]>
 ;* V07 tmp3         [V07    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
-;  V08 tmp4         [V08,T04] (  2,  1.50)   byref  ->  r15         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
-;  V09 tmp5         [V09,T03] (  2,  2   )     int  ->  rax         "field V03._length (fldOffset=0x8)" P-INDEP
+;  V08 tmp4         [V08,T05] (  2,  1.50)   byref  ->  r15         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
+;  V09 tmp5         [V09,T03] (  3,  2.50)     int  ->  r14         "field V03._length (fldOffset=0x8)" P-INDEP
 ;* V10 tmp6         [V10    ] (  0,  0   )   byref  ->  zero-ref    "field V05._reference (fldOffset=0x0)" P-DEP
 ;* V11 tmp7         [V11    ] (  0,  0   )     int  ->  zero-ref    "field V05._length (fldOffset=0x8)" P-DEP
-;  V12 tmp8         [V12,T05] (  2,  1   )   byref  ->  rax         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
-;  V13 tmp9         [V13,T06] (  2,  1   )     int  ->  rsi         "field V06._length (fldOffset=0x8)" P-INDEP
-;  V14 tmp10        [V14,T07] (  2,  1   )  struct (16) [rbp-0x20]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[System.Nullable`1[int]]>
+;  V12 tmp8         [V12,T06] (  2,  1   )   byref  ->  rax         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
+;  V13 tmp9         [V13,T07] (  2,  1   )     int  ->  rsi         "field V06._length (fldOffset=0x8)" P-INDEP
+;  V14 tmp10        [V14,T08] (  2,  1   )  struct (16) [rbp-0x28]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[System.Nullable`1[int]]>
+;  V15 cse0         [V15,T04] (  3,  2.50)    long  ->  rax         "CSE #03: aggressive"
 ;
-; Lcl frame size = 16
+; Lcl frame size = 24
 
 G_M4742_IG01:
        push     rbp
        push     r15
+       push     r14
        push     rbx
-       sub      rsp, 16
-       lea      rbp, [rsp+0x20]
+       sub      rsp, 24
+       lea      rbp, [rsp+0x30]
        xor      eax, eax
-       mov      qword ptr [rbp-0x20], rax
-						;; size=19 bbWeight=1 PerfScore 5.00
+       mov      qword ptr [rbp-0x28], rax
+						;; size=21 bbWeight=1 PerfScore 6.00
 G_M4742_IG02:
        mov      ebx, dword ptr [rdi+0x08]
        mov      r15, bword ptr [rdi+0x10]
-       mov      eax, dword ptr [rdi+0x18]
-       mov      ecx, ebx
-       mov      edx, esi
-       add      rcx, rdx
-       cmp      rcx, rax
+       mov      r14d, dword ptr [rdi+0x18]
+       mov      eax, ebx
+       mov      ecx, esi
+       add      rax, rcx
+       mov      ecx, r14d
+       cmp      rax, rcx
        jbe      SHORT G_M4742_IG05
-						;; size=22 bbWeight=1 PerfScore 8.00
+						;; size=26 bbWeight=1 PerfScore 8.25
 G_M4742_IG03:
        mov      rax, 0xD1FFAB1E      ; code for System.Collections.Generic.ValueListBuilder`1[System.Nullable`1[int]]:AppendSpanWithGrow(int):System.Span`1[System.Nullable`1[int]]:this
        call     [rax]System.Collections.Generic.ValueListBuilder`1[System.Nullable`1[int]]:AppendSpanWithGrow(int):System.Span`1[System.Nullable`1[int]]:this
-       mov      bword ptr [rbp-0x20], rax
-       mov      qword ptr [rbp-0x18], rdx
-       mov      rax, bword ptr [rbp-0x20]
-       mov      rdx, qword ptr [rbp-0x18]
+       mov      bword ptr [rbp-0x28], rax
+       mov      qword ptr [rbp-0x20], rdx
+       mov      rax, bword ptr [rbp-0x28]
+       mov      rdx, qword ptr [rbp-0x20]
 						;; size=28 bbWeight=0.50 PerfScore 3.62
 G_M4742_IG04:
-       add      rsp, 16
+       add      rsp, 24
        pop      rbx
+       pop      r14
        pop      r15
        pop      rbp
        ret      
-						;; size=9 bbWeight=0.50 PerfScore 1.38
+						;; size=11 bbWeight=0.50 PerfScore 1.62
 G_M4742_IG05:
-       lea      eax, [rbx+rsi]
-       mov      dword ptr [rdi+0x08], eax
+       lea      edx, [rbx+rsi]
+       mov      dword ptr [rdi+0x08], edx
+       mov      edx, r14d
+       cmp      rax, rdx
+       ja       SHORT G_M4742_IG07
        mov      eax, ebx
        lea      rax, bword ptr [r15+8*rax]
        mov      rdx, rsi
-						;; size=15 bbWeight=0.50 PerfScore 1.25
+						;; size=23 bbWeight=0.50 PerfScore 2.00
 G_M4742_IG06:
-       add      rsp, 16
+       add      rsp, 24
        pop      rbx
+       pop      r14
        pop      r15
        pop      rbp
        ret      
-						;; size=9 bbWeight=0.50 PerfScore 1.38
+						;; size=11 bbWeight=0.50 PerfScore 1.62
+G_M4742_IG07:
+       mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       int3     
+						;; size=13 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 102, prolog size 19, PerfScore 20.62, instruction count 36, allocated bytes for code 102 (MethodHash=a57ced79) for method System.Collections.Generic.ValueListBuilder`1[System.Nullable`1[int]]:AppendSpan(int):System.Span`1[System.Nullable`1[int]]:this (FullOpts)
+; Total bytes of code 133, prolog size 21, PerfScore 23.12, instruction count 46, allocated bytes for code 133 (MethodHash=a57ced79) for method System.Collections.Generic.ValueListBuilder`1[System.Nullable`1[int]]:AppendSpan(int):System.Span`1[System.Nullable`1[int]]:this (FullOpts)
 ; ============================================================
30 (28.85 % of base) - System.Collections.Generic.ValueListBuilder`1[System.__Canon]:AppendSpan(int):System.Span`1[System.__Canon]:this
 ; Assembly listing for method System.Collections.Generic.ValueListBuilder`1[System.__Canon]:AppendSpan(int):System.Span`1[System.__Canon]:this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX512 - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; partially interruptible
 ; No PGO data
 ; 0 inlinees with PGO data; 1 single block inlinees; 1 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 this         [V00,T00] (  7,  6   )   byref  ->  rdi         this single-def
 ;  V01 TypeCtx      [V01,T02] (  4,  3.50)    long  ->  rsi         single-def
 ;  V02 arg1         [V02,T01] (  6,  4.50)     int  ->  rdx         single-def
 ;  V03 loc0         [V03,T03] (  4,  3   )     int  ->  rbx        
 ;* V04 loc1         [V04    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op <System.Span`1[System.__Canon]>
 ;# V05 OutArgs      [V05    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V06 tmp1         [V06    ] (  0,  0   )    long  ->  zero-ref    "spilling helperCall"
 ;* V07 tmp2         [V07    ] (  0,  0   )  struct (16) zero-ref    do-not-enreg[SBR] multireg-ret "Return value temp for multireg return" <System.Span`1[System.__Canon]>
 ;* V08 tmp3         [V08    ] (  0,  0   )  struct (16) zero-ref    multireg-ret ld-addr-op "NewObj constructor temp" <System.Span`1[System.__Canon]>
 ;* V09 tmp4         [V09    ] (  0,  0   )    long  ->  zero-ref    "Inlining Arg"
 ;* V10 tmp5         [V10    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
-;  V11 tmp6         [V11,T05] (  2,  1.50)   byref  ->  r15         single-def "field V04._reference (fldOffset=0x0)" P-INDEP
-;  V12 tmp7         [V12,T04] (  2,  2   )     int  ->  rax         "field V04._length (fldOffset=0x8)" P-INDEP
+;  V11 tmp6         [V11,T06] (  2,  1.50)   byref  ->  r15         single-def "field V04._reference (fldOffset=0x0)" P-INDEP
+;  V12 tmp7         [V12,T04] (  3,  2.50)     int  ->  r14         "field V04._length (fldOffset=0x8)" P-INDEP
 ;* V13 tmp8         [V13    ] (  0,  0   )   byref  ->  zero-ref    "field V07._reference (fldOffset=0x0)" P-DEP
 ;* V14 tmp9         [V14    ] (  0,  0   )     int  ->  zero-ref    "field V07._length (fldOffset=0x8)" P-DEP
-;  V15 tmp10        [V15,T06] (  2,  1   )   byref  ->  rax         single-def "field V08._reference (fldOffset=0x0)" P-INDEP
-;  V16 tmp11        [V16,T07] (  2,  1   )     int  ->  rdx         "field V08._length (fldOffset=0x8)" P-INDEP
-;  V17 tmp12        [V17,T08] (  2,  1   )  struct (16) [rbp-0x28]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[System.__Canon]>
+;  V15 tmp10        [V15,T07] (  2,  1   )   byref  ->  rax         single-def "field V08._reference (fldOffset=0x0)" P-INDEP
+;  V16 tmp11        [V16,T08] (  2,  1   )     int  ->  rdx         "field V08._length (fldOffset=0x8)" P-INDEP
+;  V17 tmp12        [V17,T09] (  2,  1   )  struct (16) [rbp-0x30]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[System.__Canon]>
+;  V18 cse0         [V18,T05] (  3,  2.50)    long  ->  rax         "CSE #03: aggressive"
 ;
-; Lcl frame size = 32
+; Lcl frame size = 24
 
 G_M39622_IG01:
        push     rbp
        push     r15
+       push     r14
        push     rbx
-       sub      rsp, 32
+       sub      rsp, 24
        lea      rbp, [rsp+0x30]
        xor      eax, eax
-       mov      qword ptr [rbp-0x28], rax
-       mov      qword ptr [rbp-0x18], rsi
-						;; size=23 bbWeight=1 PerfScore 6.00
+       mov      qword ptr [rbp-0x30], rax
+       mov      qword ptr [rbp-0x20], rsi
+						;; size=25 bbWeight=1 PerfScore 7.00
 G_M39622_IG02:
        mov      ebx, dword ptr [rdi+0x08]
        mov      r15, bword ptr [rdi+0x10]
-       mov      eax, dword ptr [rdi+0x18]
-       mov      ecx, ebx
-       mov      r8d, edx
-       add      rcx, r8
-       cmp      rcx, rax
+       mov      r14d, dword ptr [rdi+0x18]
+       mov      eax, ebx
+       mov      ecx, edx
+       add      rax, rcx
+       mov      ecx, r14d
+       cmp      rax, rcx
        jbe      SHORT G_M39622_IG05
-						;; size=23 bbWeight=1 PerfScore 8.00
+						;; size=26 bbWeight=1 PerfScore 8.25
 G_M39622_IG03:
        mov      rax, 0xD1FFAB1E      ; code for System.Collections.Generic.ValueListBuilder`1[System.__Canon]:AppendSpanWithGrow(int):System.Span`1[System.__Canon]:this
        call     [rax]System.Collections.Generic.ValueListBuilder`1[System.__Canon]:AppendSpanWithGrow(int):System.Span`1[System.__Canon]:this
-       mov      bword ptr [rbp-0x28], rax
-       mov      qword ptr [rbp-0x20], rdx
-       mov      rax, bword ptr [rbp-0x28]
-       mov      rdx, qword ptr [rbp-0x20]
+       mov      bword ptr [rbp-0x30], rax
+       mov      qword ptr [rbp-0x28], rdx
+       mov      rax, bword ptr [rbp-0x30]
+       mov      rdx, qword ptr [rbp-0x28]
 						;; size=28 bbWeight=0.50 PerfScore 3.62
 G_M39622_IG04:
-       add      rsp, 32
+       add      rsp, 24
        pop      rbx
+       pop      r14
        pop      r15
        pop      rbp
        ret      
-						;; size=9 bbWeight=0.50 PerfScore 1.38
+						;; size=11 bbWeight=0.50 PerfScore 1.62
 G_M39622_IG05:
-       lea      eax, [rbx+rdx]
-       mov      dword ptr [rdi+0x08], eax
+       lea      ecx, [rbx+rdx]
+       mov      dword ptr [rdi+0x08], ecx
+       mov      ecx, r14d
+       cmp      rax, rcx
+       ja       SHORT G_M39622_IG07
        mov      eax, ebx
        lea      rax, bword ptr [r15+8*rax]
-						;; size=12 bbWeight=0.50 PerfScore 1.12
+						;; size=20 bbWeight=0.50 PerfScore 1.88
 G_M39622_IG06:
-       add      rsp, 32
+       add      rsp, 24
        pop      rbx
+       pop      r14
        pop      r15
        pop      rbp
        ret      
-						;; size=9 bbWeight=0.50 PerfScore 1.38
+						;; size=11 bbWeight=0.50 PerfScore 1.62
+G_M39622_IG07:
+       mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       int3     
+						;; size=13 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 104, prolog size 23, PerfScore 21.50, instruction count 36, allocated bytes for code 104 (MethodHash=372b6539) for method System.Collections.Generic.ValueListBuilder`1[System.__Canon]:AppendSpan(int):System.Span`1[System.__Canon]:this (FullOpts)
+; Total bytes of code 134, prolog size 25, PerfScore 24.00, instruction count 46, allocated bytes for code 134 (MethodHash=372b6539) for method System.Collections.Generic.ValueListBuilder`1[System.__Canon]:AppendSpan(int):System.Span`1[System.__Canon]:this (FullOpts)
 ; ============================================================
30 (30.00 % of base) - System.Collections.Generic.ValueListBuilder`1[System.Numerics.Vector`1[float]]:AppendSpan(int):System.Span`1[System.Numerics.Vector`1[float]]:this
 ; Assembly listing for method System.Collections.Generic.ValueListBuilder`1[System.Numerics.Vector`1[float]]:AppendSpan(int):System.Span`1[System.Numerics.Vector`1[float]]:this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX512 - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; partially interruptible
 ; No PGO data
 ; 0 inlinees with PGO data; 1 single block inlinees; 1 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 this         [V00,T00] (  7,  6   )   byref  ->  rdi         this single-def
 ;  V01 arg1         [V01,T01] (  6,  4.50)     int  ->  rsi         single-def
 ;  V02 loc0         [V02,T02] (  4,  3   )     int  ->  rbx        
 ;* V03 loc1         [V03    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op <System.Span`1[System.Numerics.Vector`1[float]]>
 ;# V04 OutArgs      [V04    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V05 tmp1         [V05    ] (  0,  0   )  struct (16) zero-ref    do-not-enreg[SBR] multireg-ret "Return value temp for multireg return" <System.Span`1[System.Numerics.Vector`1[float]]>
 ;* V06 tmp2         [V06    ] (  0,  0   )  struct (16) zero-ref    multireg-ret ld-addr-op "NewObj constructor temp" <System.Span`1[System.Numerics.Vector`1[float]]>
 ;* V07 tmp3         [V07    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
-;  V08 tmp4         [V08,T04] (  2,  1.50)   byref  ->  rax         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
-;  V09 tmp5         [V09,T03] (  2,  2   )     int  ->  rcx         "field V03._length (fldOffset=0x8)" P-INDEP
+;  V08 tmp4         [V08,T05] (  2,  1.50)   byref  ->  rax         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
+;  V09 tmp5         [V09,T03] (  3,  2.50)     int  ->  r15         "field V03._length (fldOffset=0x8)" P-INDEP
 ;* V10 tmp6         [V10    ] (  0,  0   )   byref  ->  zero-ref    "field V05._reference (fldOffset=0x0)" P-DEP
 ;* V11 tmp7         [V11    ] (  0,  0   )     int  ->  zero-ref    "field V05._length (fldOffset=0x8)" P-DEP
-;  V12 tmp8         [V12,T05] (  2,  1   )   byref  ->  rax         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
-;  V13 tmp9         [V13,T06] (  2,  1   )     int  ->  rsi         "field V06._length (fldOffset=0x8)" P-INDEP
-;  V14 tmp10        [V14,T07] (  2,  1   )  struct (16) [rbp-0x18]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[System.Numerics.Vector`1[float]]>
+;  V12 tmp8         [V12,T06] (  2,  1   )   byref  ->  rax         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
+;  V13 tmp9         [V13,T07] (  2,  1   )     int  ->  rsi         "field V06._length (fldOffset=0x8)" P-INDEP
+;  V14 tmp10        [V14,T08] (  2,  1   )  struct (16) [rbp-0x20]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[System.Numerics.Vector`1[float]]>
+;  V15 cse0         [V15,T04] (  3,  2.50)    long  ->  rcx         "CSE #03: aggressive"
 ;
-; Lcl frame size = 24
+; Lcl frame size = 16
 
 G_M25766_IG01:
        push     rbp
+       push     r15
        push     rbx
-       sub      rsp, 24
+       sub      rsp, 16
        lea      rbp, [rsp+0x20]
        xor      eax, eax
-       mov      qword ptr [rbp-0x18], rax
-						;; size=17 bbWeight=1 PerfScore 4.00
+       mov      qword ptr [rbp-0x20], rax
+						;; size=19 bbWeight=1 PerfScore 5.00
 G_M25766_IG02:
        mov      ebx, dword ptr [rdi+0x08]
        mov      rax, bword ptr [rdi+0x10]
-       mov      ecx, dword ptr [rdi+0x18]
-       mov      edx, ebx
-       mov      r8d, esi
-       add      rdx, r8
-       cmp      rdx, rcx
+       mov      r15d, dword ptr [rdi+0x18]
+       mov      ecx, ebx
+       mov      edx, esi
+       add      rcx, rdx
+       mov      edx, r15d
+       cmp      rcx, rdx
        jbe      SHORT G_M25766_IG05
-						;; size=23 bbWeight=1 PerfScore 8.00
+						;; size=26 bbWeight=1 PerfScore 8.25
 G_M25766_IG03:
        mov      rax, 0xD1FFAB1E      ; code for System.Collections.Generic.ValueListBuilder`1[System.Numerics.Vector`1[float]]:AppendSpanWithGrow(int):System.Span`1[System.Numerics.Vector`1[float]]:this
        call     [rax]System.Collections.Generic.ValueListBuilder`1[System.Numerics.Vector`1[float]]:AppendSpanWithGrow(int):System.Span`1[System.Numerics.Vector`1[float]]:this
-       mov      bword ptr [rbp-0x18], rax
-       mov      qword ptr [rbp-0x10], rdx
-       mov      rax, bword ptr [rbp-0x18]
-       mov      rdx, qword ptr [rbp-0x10]
+       mov      bword ptr [rbp-0x20], rax
+       mov      qword ptr [rbp-0x18], rdx
+       mov      rax, bword ptr [rbp-0x20]
+       mov      rdx, qword ptr [rbp-0x18]
 						;; size=28 bbWeight=0.50 PerfScore 3.62
 G_M25766_IG04:
-       add      rsp, 24
+       add      rsp, 16
        pop      rbx
+       pop      r15
        pop      rbp
        ret      
-						;; size=7 bbWeight=0.50 PerfScore 1.12
+						;; size=9 bbWeight=0.50 PerfScore 1.38
 G_M25766_IG05:
        lea      edx, [rbx+rsi]
        mov      dword ptr [rdi+0x08], edx
+       mov      edx, r15d
+       cmp      rcx, rdx
+       ja       SHORT G_M25766_IG07
        mov      edx, ebx
        shl      rdx, 5
        add      rax, rdx
        mov      rdx, rsi
-						;; size=18 bbWeight=0.50 PerfScore 1.38
+						;; size=26 bbWeight=0.50 PerfScore 2.12
 G_M25766_IG06:
-       add      rsp, 24
+       add      rsp, 16
        pop      rbx
+       pop      r15
        pop      rbp
        ret      
-						;; size=7 bbWeight=0.50 PerfScore 1.12
+						;; size=9 bbWeight=0.50 PerfScore 1.38
+G_M25766_IG07:
+       mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       int3     
+						;; size=13 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 100, prolog size 17, PerfScore 19.25, instruction count 34, allocated bytes for code 100 (MethodHash=cacc9b59) for method System.Collections.Generic.ValueListBuilder`1[System.Numerics.Vector`1[float]]:AppendSpan(int):System.Span`1[System.Numerics.Vector`1[float]]:this (FullOpts)
+; Total bytes of code 130, prolog size 19, PerfScore 21.75, instruction count 44, allocated bytes for code 130 (MethodHash=cacc9b59) for method System.Collections.Generic.ValueListBuilder`1[System.Numerics.Vector`1[float]]:AppendSpan(int):System.Span`1[System.Numerics.Vector`1[float]]:this (FullOpts)
 ; ============================================================
30 (31.25 % of base) - System.Collections.Generic.ValueListBuilder`1[ubyte]:AppendSpan(int):System.Span`1[ubyte]:this
 ; Assembly listing for method System.Collections.Generic.ValueListBuilder`1[ubyte]:AppendSpan(int):System.Span`1[ubyte]:this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX512 - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; partially interruptible
 ; No PGO data
 ; 0 inlinees with PGO data; 1 single block inlinees; 1 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 this         [V00,T00] (  7,  6   )   byref  ->  rdi         this single-def
 ;  V01 arg1         [V01,T01] (  6,  4.50)     int  ->  rsi         single-def
 ;  V02 loc0         [V02,T02] (  4,  3   )     int  ->  rbx        
 ;* V03 loc1         [V03    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op <System.Span`1[ubyte]>
 ;# V04 OutArgs      [V04    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V05 tmp1         [V05    ] (  0,  0   )  struct (16) zero-ref    do-not-enreg[SBR] multireg-ret "Return value temp for multireg return" <System.Span`1[ubyte]>
 ;* V06 tmp2         [V06    ] (  0,  0   )  struct (16) zero-ref    multireg-ret ld-addr-op "NewObj constructor temp" <System.Span`1[ubyte]>
 ;* V07 tmp3         [V07    ] (  0,  0   )   byref  ->  zero-ref    "Inlining Arg"
-;  V08 tmp4         [V08,T04] (  2,  1.50)   byref  ->  rax         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
-;  V09 tmp5         [V09,T03] (  2,  2   )     int  ->  rcx         "field V03._length (fldOffset=0x8)" P-INDEP
+;  V08 tmp4         [V08,T05] (  2,  1.50)   byref  ->  rax         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
+;  V09 tmp5         [V09,T03] (  3,  2.50)     int  ->  r15         "field V03._length (fldOffset=0x8)" P-INDEP
 ;* V10 tmp6         [V10    ] (  0,  0   )   byref  ->  zero-ref    "field V05._reference (fldOffset=0x0)" P-DEP
 ;* V11 tmp7         [V11    ] (  0,  0   )     int  ->  zero-ref    "field V05._length (fldOffset=0x8)" P-DEP
-;  V12 tmp8         [V12,T05] (  2,  1   )   byref  ->  rax         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
-;  V13 tmp9         [V13,T06] (  2,  1   )     int  ->  rsi         "field V06._length (fldOffset=0x8)" P-INDEP
-;  V14 tmp10        [V14,T07] (  2,  1   )  struct (16) [rbp-0x18]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[ubyte]>
+;  V12 tmp8         [V12,T06] (  2,  1   )   byref  ->  rax         single-def "field V06._reference (fldOffset=0x0)" P-INDEP
+;  V13 tmp9         [V13,T07] (  2,  1   )     int  ->  rsi         "field V06._length (fldOffset=0x8)" P-INDEP
+;  V14 tmp10        [V14,T08] (  2,  1   )  struct (16) [rbp-0x20]  do-not-enreg[SR] multireg-ret must-init "Return value temp for multi-reg return (rejected tail call)." <System.Span`1[ubyte]>
+;  V15 cse0         [V15,T04] (  3,  2.50)    long  ->  rcx         "CSE #03: aggressive"
 ;
-; Lcl frame size = 24
+; Lcl frame size = 16
 
 G_M1894_IG01:
        push     rbp
+       push     r15
        push     rbx
-       sub      rsp, 24
+       sub      rsp, 16
        lea      rbp, [rsp+0x20]
        xor      eax, eax
-       mov      qword ptr [rbp-0x18], rax
-						;; size=17 bbWeight=1 PerfScore 4.00
+       mov      qword ptr [rbp-0x20], rax
+						;; size=19 bbWeight=1 PerfScore 5.00
 G_M1894_IG02:
        mov      ebx, dword ptr [rdi+0x08]
        mov      rax, bword ptr [rdi+0x10]
-       mov      ecx, dword ptr [rdi+0x18]
-       mov      edx, ebx
-       mov      r8d, esi
-       add      rdx, r8
-       cmp      rdx, rcx
+       mov      r15d, dword ptr [rdi+0x18]
+       mov      ecx, ebx
+       mov      edx, esi
+       add      rcx, rdx
+       mov      edx, r15d
+       cmp      rcx, rdx
        jbe      SHORT G_M1894_IG05
-						;; size=23 bbWeight=1 PerfScore 8.00
+						;; size=26 bbWeight=1 PerfScore 8.25
 G_M1894_IG03:
        mov      rax, 0xD1FFAB1E      ; code for System.Collections.Generic.ValueListBuilder`1[ubyte]:AppendSpanWithGrow(int):System.Span`1[ubyte]:this
        call     [rax]System.Collections.Generic.ValueListBuilder`1[ubyte]:AppendSpanWithGrow(int):System.Span`1[ubyte]:this
-       mov      bword ptr [rbp-0x18], rax
-       mov      qword ptr [rbp-0x10], rdx
-       mov      rax, bword ptr [rbp-0x18]
-       mov      rdx, qword ptr [rbp-0x10]
+       mov      bword ptr [rbp-0x20], rax
+       mov      qword ptr [rbp-0x18], rdx
+       mov      rax, bword ptr [rbp-0x20]
+       mov      rdx, qword ptr [rbp-0x18]
 						;; size=28 bbWeight=0.50 PerfScore 3.62
 G_M1894_IG04:
-       add      rsp, 24
+       add      rsp, 16
        pop      rbx
+       pop      r15
        pop      rbp
        ret      
-						;; size=7 bbWeight=0.50 PerfScore 1.12
+						;; size=9 bbWeight=0.50 PerfScore 1.38
 G_M1894_IG05:
        lea      edx, [rbx+rsi]
        mov      dword ptr [rdi+0x08], edx
+       mov      edx, r15d
+       cmp      rcx, rdx
+       ja       SHORT G_M1894_IG07
        mov      edx, ebx
        add      rax, rdx
        mov      rdx, rsi
-						;; size=14 bbWeight=0.50 PerfScore 1.12
+						;; size=22 bbWeight=0.50 PerfScore 1.88
 G_M1894_IG06:
-       add      rsp, 24
+       add      rsp, 16
        pop      rbx
+       pop      r15
        pop      rbp
        ret      
-						;; size=7 bbWeight=0.50 PerfScore 1.12
+						;; size=9 bbWeight=0.50 PerfScore 1.38
+G_M1894_IG07:
+       mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
+       int3     
+						;; size=13 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 96, prolog size 17, PerfScore 19.00, instruction count 33, allocated bytes for code 96 (MethodHash=6fdff899) for method System.Collections.Generic.ValueListBuilder`1[ubyte]:AppendSpan(int):System.Span`1[ubyte]:this (FullOpts)
+; Total bytes of code 126, prolog size 19, PerfScore 21.50, instruction count 43, allocated bytes for code 126 (MethodHash=6fdff899) for method System.Collections.Generic.ValueListBuilder`1[ubyte]:AppendSpan(int):System.Span`1[ubyte]:this (FullOpts)
 ; ============================================================

Note: some changes were skipped as they were too large to fit into a comment.

Larger list of diffs: https://gist.github.com/MihuBot/ede43b68de9e271822f383e7568c702b

@MihuBot
Copy link
Owner Author

MihuBot commented Dec 15, 2024

Top method improvements

-1 (-0.11 % of base) - System.Numerics.Tensors.ReadOnlyTensorSpan`1[double]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this
 ; Assembly listing for method System.Numerics.Tensors.ReadOnlyTensorSpan`1[double]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX512 - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; fully interruptible
 ; No PGO data
 ; 0 inlinees with PGO data; 20 single block inlinees; 10 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 this         [V00,T11] (  5,  3.50)   byref  ->  [rbp-0xB8]  this single-def
 ;  V01 arg1         [V01,T06] ( 14,  8.50)     ref  ->  r14         class-hnd single-def <System.Array>
 ;* V02 arg2         [V02    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op single-def <System.ReadOnlySpan`1[System.Buffers.NIndex]>
 ;* V03 arg3         [V03    ] (  0,  0   )  struct (16) zero-ref    multireg-arg multireg-ret ld-addr-op <System.ReadOnlySpan`1[long]>
 ;* V04 arg4         [V04    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op single-def <System.ReadOnlySpan`1[long]>
 ;* V05 loc0         [V05    ] (  0,  0   )    long  ->  zero-ref    single-def
 ;  V06 loc1         [V06,T21] (  4,  2   )    long  ->  [rbp-0x30]  spill-single-def
 ;* V07 loc2         [V07    ] (  0,  0   )    long  ->  zero-ref    single-def
 ;* V08 loc3         [V08    ] (  0,  0   )  struct (16) zero-ref    multireg-arg <System.Span`1[long]>
 ;* V09 loc4         [V09    ] (  0,  0   )     int  ->  zero-ref    single-def
 ;# V10 OutArgs      [V10    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V11 tmp1         [V11    ] (  0,  0   )  struct (16) zero-ref    multireg-arg <System.ReadOnlySpan`1[long]>
 ;  V12 tmp2         [V12    ] (  2,  2   )  struct (104) [rbp-0x98]  do-not-enreg[XS] must-init addr-exposed ld-addr-op "NewObj constructor temp" <System.Numerics.Tensors.TensorShape>
 ;  V13 tmp3         [V13,T16] (  3,  3   )     ref  ->  rax         class-hnd exact single-def "NewArr temp" <long[]>
 ;* V14 tmp4         [V14    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.Span`1[long]>
 ;  V15 tmp5         [V15,T41] (  2,  1   )     int  ->  rdi         "Inline return value spill temp"
 ;* V16 tmp6         [V16    ] (  0,  0   )     int  ->  zero-ref    single-def "Inline stloc first use temp"
 ;  V17 tmp7         [V17,T18] (  3,  3   )     int  ->  rdi         "impAppendStmt"
 ;  V18 tmp8         [V18,T26] (  2,  2   )   byref  ->  rsi         single-def "Inlining Arg"
 ;  V19 tmp9         [V19,T22] (  4,  2   )     int  ->  rsi         "Inline return value spill temp"
 ;* V20 tmp10        [V20    ] (  0,  0   )     int  ->  zero-ref    single-def "Inline stloc first use temp"
 ;  V21 tmp11        [V21,T19] (  3,  3   )     int  ->  rsi         "impAppendStmt"
 ;* V22 tmp12        [V22,T45] (  0,  0   )   byref  ->  zero-ref    single-def "Inlining Arg"
 ;  V23 tmp13        [V23,T28] (  2,  2   )    long  ->  rdi         "Inlining Arg"
 ;  V24 tmp14        [V24,T42] (  2,  1   )     int  ->  rsi         "Inline return value spill temp"
 ;* V25 tmp15        [V25    ] (  0,  0   )     int  ->  zero-ref    single-def "Inline stloc first use temp"
 ;  V26 tmp16        [V26,T29] (  2,  2   )     int  ->  rsi         "impAppendStmt"
 ;* V27 tmp17        [V27,T46] (  0,  0   )   byref  ->  zero-ref    single-def "Inlining Arg"
 ;* V28 tmp18        [V28    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.Span`1[long]>
 ;  V29 tmp19        [V29,T23] (  4,  2   )    long  ->  [rbp-0xA0]  "Inline return value spill temp"
 ;* V30 tmp20        [V30    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.ReadOnlySpan`1[long]>
 ;  V31 tmp21        [V31,T07] (  5,  9.25)    long  ->  rdi         "Inline stloc first use temp"
 ;* V32 tmp22        [V32,T52] (  0,  0   )     int  ->  zero-ref    "Inline stloc first use temp"
 ;  V33 tmp23        [V33,T17] (  3,  3   )     ref  ->  [rbp-0xC0]  class-hnd exact spill-single-def "Inlining Arg" <System.RuntimeType>
 ;  V34 tmp24        [V34,T38] (  2,  1   )     ref  ->  rax         class-hnd "Inline return value spill temp" <System.RuntimeType>
 ;  V35 tmp25        [V35,T24] (  4,  2   )    long  ->  [rbp-0xA8]  spill-single-def "Inline stloc first use temp"
 ;* V36 tmp26        [V36    ] (  0,  0   )     ref  ->  zero-ref    class-hnd exact single-def "impAppendStmt" <System.RuntimeType>
 ;  V37 tmp27        [V37,T27] (  2,  2   )     ref  ->  rax         class-hnd exact single-def "dup spill" <System.RuntimeType>
 ;  V38 tmp28        [V38,T20] (  4,  2   )     ref  ->  rax        
 ;  V39 tmp29        [V39,T12] (  4,  4   )     ref  ->  rax         class-hnd single-def "Inlining Arg" <long[]>
 ;* V40 tmp30        [V40    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[long]>
 ;  V41 tmp31        [V41,T08] (  4,  9   )    long  ->  rsi         "Inline stloc first use temp"
 ;  V42 tmp32        [V42,T00] (  6, 20.50)     int  ->  rdx         "Inline stloc first use temp"
 ;* V43 tmp33        [V43    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.ReadOnlySpan`1[long]>
 ;* V44 tmp34        [V44    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.ReadOnlySpan`1[long]>
 ;  V45 tmp35        [V45,T14] (  2,  1.50)   byref  ->  [rbp-0xC8]  single-def "field V02._reference (fldOffset=0x0)" P-INDEP
 ;  V46 tmp36        [V46,T13] (  3,  2   )     int  ->  [rbp-0xAC]  single-def "field V02._length (fldOffset=0x8)" P-INDEP
 ;  V47 tmp37        [V47,T03] (  7, 11   )   byref  ->  r15         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
 ;  V48 tmp38        [V48,T02] ( 10, 13.50)     int  ->  rbx         single-def "field V03._length (fldOffset=0x8)" P-INDEP
 ;  V49 tmp39        [V49,T10] (  5,  6   )   byref  ->  r12         "field V04._reference (fldOffset=0x0)" P-INDEP
 ;  V50 tmp40        [V50,T09] (  6,  6.50)     int  ->  r13         "field V04._length (fldOffset=0x8)" P-INDEP
 ;  V51 tmp41        [V51,T31] (  3,  1.50)   byref  ->  rdi         "field V08._reference (fldOffset=0x0)" P-INDEP
 ;  V52 tmp42        [V52,T34] (  3,  1.50)     int  ->  rsi         "field V08._length (fldOffset=0x8)" P-INDEP
 ;  V53 tmp43        [V53,T32] (  3,  1.50)   byref  ->  rdi         "field V11._reference (fldOffset=0x0)" P-INDEP
 ;  V54 tmp44        [V54,T35] (  3,  1.50)     int  ->  rsi         "field V11._length (fldOffset=0x8)" P-INDEP
 ;  V55 tmp45        [V55,T39] (  2,  1   )   byref  ->  rdi         single-def "field V14._reference (fldOffset=0x0)" P-INDEP
 ;  V56 tmp46        [V56,T43] (  2,  1   )     int  ->  rsi         single-def "field V14._length (fldOffset=0x8)" P-INDEP
 ;  V57 tmp47        [V57,T40] (  2,  1   )   byref  ->  rdi         "field V28._reference (fldOffset=0x0)" P-INDEP
 ;  V58 tmp48        [V58,T44] (  2,  1   )     int  ->  rsi         "field V28._length (fldOffset=0x8)" P-INDEP
 ;* V59 tmp49        [V59,T47] (  0,  0   )   byref  ->  zero-ref    single-def "field V30._reference (fldOffset=0x0)" P-INDEP
 ;  V60 tmp50        [V60,T30] (  2,  2   )     int  ->  rdi         single-def "field V30._length (fldOffset=0x8)" P-INDEP
 ;  V61 tmp51        [V61,T33] (  3,  1.50)   byref  ->  rdi         "field V40._reference (fldOffset=0x0)" P-INDEP
 ;  V62 tmp52        [V62,T36] (  3,  1.50)     int  ->  rsi         "field V40._length (fldOffset=0x8)" P-INDEP
 ;* V63 tmp53        [V63,T48] (  0,  0   )   byref  ->  zero-ref    single-def "field V43._reference (fldOffset=0x0)" P-INDEP
 ;* V64 tmp54        [V64,T50] (  0,  0   )     int  ->  zero-ref    single-def "field V43._length (fldOffset=0x8)" P-INDEP
 ;* V65 tmp55        [V65,T49] (  0,  0   )   byref  ->  zero-ref    single-def "field V44._reference (fldOffset=0x0)" P-INDEP
 ;* V66 tmp56        [V66,T51] (  0,  0   )     int  ->  zero-ref    single-def "field V44._length (fldOffset=0x8)" P-INDEP
 ;  V67 GsCookie     [V67    ] (  1,  1   )    long  ->  [rbp-0xD0]  do-not-enreg[X] addr-exposed "GSSecurityCookie"
 ;  V68 cse0         [V68,T25] (  4,  2   )     int  ->  rsi         "CSE #04: conservative"
 ;  V69 cse1         [V69,T04] (  3, 12   )    long  ->   r8         "CSE #07: aggressive"
-;  V70 cse2         [V70,T37] (  3,  1.50)     int  ->  rdx         "CSE #10: conservative"
+;  V70 cse2         [V70,T37] (  3,  1.50)    long  ->  rdx         "CSE #11: conservative"
 ;  V71 cse3         [V71,T15] (  4,  2   )    long  ->  rsi         multi-def "CSE #01: moderate"
 ;  V72 cse4         [V72,T05] (  3, 12   )    long  ->  rcx         "CSE #08: aggressive"
 ;  V73 rat0         [V73,T01] (  5, 16.25)    long  ->  rsi         "Widened IV V32"
 ;
 ; Lcl frame size = 168
 
 G_M55583_IG01:
        push     rbp
        push     r15
        push     r14
        push     r13
        push     r12
        push     rbx
        sub      rsp, 168
        lea      rbp, [rsp+0xD0]
        xor      eax, eax
        mov      qword ptr [rbp-0x98], rax
        vxorps   xmm8, xmm8, xmm8
        vmovdqu32 zmmword ptr [rbp-0x90], zmm8
        vmovdqa  xmmword ptr [rbp-0x50], xmm8
        vmovdqa  xmmword ptr [rbp-0x40], xmm8
        mov      qword ptr [rbp-0xD0], 0xD1FFAB1E
        mov      bword ptr [rbp-0xB8], rdi
        mov      bword ptr [rbp-0xC8], rdx
        mov      dword ptr [rbp-0xAC], ecx
        mov      r14, rsi
        mov      r15, r8
        mov      ebx, r9d
        mov      r12, bword ptr [rbp+0x10]
        mov      r13d, dword ptr [rbp+0x18]
 						;; size=107 bbWeight=1 PerfScore 21.08
 G_M55583_IG02:
        test     ebx, ebx
        jne      G_M55583_IG08
 						;; size=8 bbWeight=1 PerfScore 1.25
 G_M55583_IG03:
        test     r14, r14
        je       G_M55583_IG08
        mov      rsi, qword ptr [r14]
        mov      esi, dword ptr [rsi+0x04]
        add      esi, -24
        shr      esi, 3
        mov      edi, esi
        test     edi, edi
        je       SHORT G_M55583_IG04
        cmp      edi, 8
        jle      SHORT G_M55583_IG04
        movsxd   rsi, esi
        mov      rdi, 0xD1FFAB1E      ; long[]
        call     CORINFO_HELP_NEWARR_1_VC
        lea      rdi, bword ptr [rax+0x10]
        mov      esi, dword ptr [rax+0x08]
        jmp      SHORT G_M55583_IG07
        align    [14 bytes for IG10]
 						;; size=73 bbWeight=0.50 PerfScore 7.38
 G_M55583_IG04:
        mov      edi, 1
        test     esi, esi
        cmove    esi, edi
        mov      edi, esi
        mov      r8d, 8
        mov      rax, rdi
        mul      rdx:rax, r8
        jb       G_M55583_IG30
        mov      rdi, rax
        test     rdi, rdi
        je       SHORT G_M55583_IG06
        add      rdi, 15
        shr      rdi, 4
 						;; size=46 bbWeight=0.50 PerfScore 3.88
 G_M55583_IG05:
        push     0
        push     0
        dec      rdi
        jne      SHORT G_M55583_IG05
        lea      rdi, [rsp]
 						;; size=13 bbWeight=0.50 PerfScore 1.88
 G_M55583_IG06:
        test     esi, esi
        jl       G_M55583_IG28
 						;; size=8 bbWeight=0.50 PerfScore 0.62
 G_M55583_IG07:
        mov      rdx, r14
        mov      rax, 0xD1FFAB1E      ; code for System.Numerics.Tensors.TensorSpanHelpers:FillLengths(System.Span`1[long],System.Array):System.ReadOnlySpan`1[long]
        call     [rax]System.Numerics.Tensors.TensorSpanHelpers:FillLengths(System.Span`1[long],System.Array):System.ReadOnlySpan`1[long]
        mov      r15, rax
        mov      ebx, edx
 						;; size=20 bbWeight=0.50 PerfScore 2.00
 G_M55583_IG08:
        mov      edi, ebx
        test     edi, edi
        je       SHORT G_M55583_IG12
 						;; size=6 bbWeight=1 PerfScore 1.50
 G_M55583_IG09:
        mov      edi, 1
        xor      esi, esi
 						;; size=7 bbWeight=0.25 PerfScore 0.12
 G_M55583_IG10:
        mov      r8, qword ptr [r15+8*rsi]
        test     r8, r8
        jl       G_M55583_IG27
        imul     rdi, r8
        inc      esi
        cmp      esi, ebx
        jl       SHORT G_M55583_IG10
 						;; size=23 bbWeight=4 PerfScore 27.00
 G_M55583_IG11:
        test     rdi, rdi
        jl       G_M55583_IG27
        mov      rsi, rdi
        mov      qword ptr [rbp-0xA0], rsi
        jmp      SHORT G_M55583_IG13
        align    [0 bytes for IG20]
 						;; size=21 bbWeight=0.50 PerfScore 2.25
 G_M55583_IG12:
        xor      esi, esi
        mov      qword ptr [rbp-0xA0], rsi
 						;; size=9 bbWeight=0.50 PerfScore 0.62
 G_M55583_IG13:
        test     r14, r14
        je       G_M55583_IG22
 						;; size=9 bbWeight=1 PerfScore 1.25
 G_M55583_IG14:
        mov      rdi, r14
        mov      r8, 0xD1FFAB1E      ; code for System.Object:GetType():System.Type:this
        call     [r8]System.Object:GetType():System.Type:this
        mov      gword ptr [rbp-0xC0], rax
        mov      rdi, qword ptr [rax+0x18]
        call     System.RuntimeTypeHandle:GetElementTypeHandle(long):long
        mov      qword ptr [rbp-0xA8], rax
        test     rax, rax
        je       G_M55583_IG26
        mov      rdi, rax
        call     System.RuntimeTypeHandle:GetRuntimeTypeFromHandleIfExists(long):System.RuntimeType
        test     rax, rax
        jne      SHORT G_M55583_IG15
        mov      rdi, qword ptr [rbp-0xA8]
        mov      rax, 0xD1FFAB1E      ; code for System.RuntimeTypeHandle:GetRuntimeTypeFromHandleSlow(long):System.RuntimeType
        call     [rax]System.RuntimeTypeHandle:GetRuntimeTypeFromHandleSlow(long):System.RuntimeType
 						;; size=80 bbWeight=0.50 PerfScore 8.25
 G_M55583_IG15:
        mov      rdi, 0xD1FFAB1E      ; 'System.Double'
        cmp      rax, rdi
        jne      G_M55583_IG26
        test     r13d, r13d
        jne      SHORT G_M55583_IG18
        mov      rdi, r15
        mov      esi, ebx
        mov      rdx, qword ptr [rbp-0xA0]
        mov      rax, 0xD1FFAB1E      ; code for System.Numerics.Tensors.TensorSpanHelpers:CalculateStrides(System.ReadOnlySpan`1[long],long):long[]
        call     [rax]System.Numerics.Tensors.TensorSpanHelpers:CalculateStrides(System.ReadOnlySpan`1[long],long):long[]
        test     rax, rax
        je       SHORT G_M55583_IG16
        lea      rdi, bword ptr [rax+0x10]
        mov      esi, dword ptr [rax+0x08]
        jmp      SHORT G_M55583_IG17
 						;; size=62 bbWeight=0.50 PerfScore 6.62
 G_M55583_IG16:
        xor      rdi, rdi
        xor      esi, esi
 						;; size=4 bbWeight=0.50 PerfScore 0.25
 G_M55583_IG17:
        jmp      SHORT G_M55583_IG19
 						;; size=2 bbWeight=0.50 PerfScore 1.00
 G_M55583_IG18:
        mov      rdi, r12
        mov      esi, r13d
 						;; size=6 bbWeight=0.50 PerfScore 0.25
 G_M55583_IG19:
        mov      r12, rdi
        mov      r13d, esi
        mov      rdi, r12
        mov      esi, r13d
        mov      rdx, r15
        mov      ecx, ebx
        mov      rax, 0xD1FFAB1E      ; code for System.Numerics.Tensors.TensorSpanHelpers:ValidateStrides(System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long])
        call     [rax]System.Numerics.Tensors.TensorSpanHelpers:ValidateStrides(System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long])
        mov      rsi, bword ptr [rbp-0xC8]
        mov      edx, dword ptr [rbp-0xAC]
        mov      rdi, r14
        mov      rax, 0xD1FFAB1E      ; code for System.Numerics.Tensors.TensorSpanHelpers:ComputeStartOffsetSystemArray(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex]):long
        call     [rax]System.Numerics.Tensors.TensorSpanHelpers:ComputeStartOffsetSystemArray(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex]):long
        mov      qword ptr [rbp-0x30], rax
        xor      esi, esi
        xor      edx, edx
        test     ebx, ebx
        jle      SHORT G_M55583_IG21
 						;; size=69 bbWeight=0.50 PerfScore 6.50
 G_M55583_IG20:
        cmp      edx, r13d
        jae      G_M55583_IG29
        mov      ecx, edx
        mov      r8, qword ptr [r12+8*rcx]
        mov      rcx, qword ptr [r15+8*rcx]
        dec      rcx
        imul     rcx, r8
        add      rsi, rcx
        inc      edx
        cmp      edx, ebx
        jl       SHORT G_M55583_IG20
 						;; size=35 bbWeight=4 PerfScore 38.00
 G_M55583_IG21:
        mov      edx, eax
        mov      esi, esi
        add      rsi, rdx
        mov      edx, dword ptr [r14+0x08]
        test     edx, edx
        jl       G_M55583_IG30
-       mov      ecx, edx
-       cmp      rsi, rcx
+       cmp      rsi, rdx
        ja       G_M55583_IG27
-       mov      esi, edx
+       mov      rsi, rdx
        sub      rsi, rax
        mov      rdx, r15
        mov      ecx, ebx
        mov      r8, r12
        mov      r9d, r13d
        lea      rdi, [rbp-0x98]
        mov      r10, 0xD1FFAB1E      ; code for System.Numerics.Tensors.TensorShape:.ctor(long,System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this
        call     [r10]System.Numerics.Tensors.TensorShape:.ctor(long,System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this
        mov      rbx, bword ptr [rbp-0xB8]
        lea      rdi, bword ptr [rbx+0x08]
        lea      rsi, bword ptr [rbp-0x98]
        call     CORINFO_HELP_ASSIGN_BYREF
        mov      ecx, 12
        rep movsq 
        lea      rax, bword ptr [r14+0x08]
        mov      rsi, qword ptr [r14]
        mov      ecx, dword ptr [rsi+0x04]
        add      rcx, -16
        add      rax, rcx
        mov      ecx, dword ptr [rbp-0x30]
        shl      rcx, 3
        add      rax, rcx
        mov      bword ptr [rbx], rax
        jmp      SHORT G_M55583_IG23
-						;; size=129 bbWeight=0.50 PerfScore 24.38
+						;; size=128 bbWeight=0.50 PerfScore 24.25
 G_M55583_IG22:
        cmp      dword ptr [rbp-0xAC], 0
        jne      SHORT G_M55583_IG27
        cmp      qword ptr [rbp-0xA0], 0
        jne      SHORT G_M55583_IG27
        xor      ecx, ecx
        mov      rax, bword ptr [rbp-0xB8]
        mov      qword ptr [rax], rcx
        mov      qword ptr [rax+0x08], rcx
        vxorps   xmm0, xmm0, xmm0
        vmovdqu32 zmmword ptr [rax+0x10], zmm0
        vmovdqu  ymmword ptr [rax+0x50], ymm0
 						;; size=54 bbWeight=0.50 PerfScore 6.79
 G_M55583_IG23:
        cmp      qword ptr [rbp-0xD0], 0xD1FFAB1E
        je       SHORT G_M55583_IG24
        call     CORINFO_HELP_FAIL_FAST
 						;; size=18 bbWeight=1 PerfScore 4.00
 G_M55583_IG24:
        nop      
 						;; size=1 bbWeight=1 PerfScore 0.25
 G_M55583_IG25:
        lea      rsp, [rbp-0x28]
        pop      rbx
        pop      r12
        pop      r13
        pop      r14
        pop      r15
        pop      rbp
        ret      
 						;; size=15 bbWeight=1 PerfScore 4.50
 G_M55583_IG26:
        mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArrayTypeMismatchException()
        call     [rax]System.ThrowHelper:ThrowArrayTypeMismatchException()
        int3     
 						;; size=13 bbWeight=0 PerfScore 0.00
 G_M55583_IG27:
        mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
        call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
        int3     
 						;; size=13 bbWeight=0 PerfScore 0.00
 G_M55583_IG28:
        mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
        call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
        int3     
 						;; size=13 bbWeight=0 PerfScore 0.00
 G_M55583_IG29:
        call     CORINFO_HELP_RNGCHKFAIL
        int3     
 						;; size=6 bbWeight=0 PerfScore 0.00
 G_M55583_IG30:
        call     CORINFO_HELP_OVERFLOW
        int3     
 						;; size=6 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 876, prolog size 107, PerfScore 171.63, instruction count 225, allocated bytes for code 876 (MethodHash=a96926e0) for method System.Numerics.Tensors.ReadOnlyTensorSpan`1[double]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
+; Total bytes of code 875, prolog size 107, PerfScore 171.50, instruction count 224, allocated bytes for code 875 (MethodHash=a96926e0) for method System.Numerics.Tensors.ReadOnlyTensorSpan`1[double]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
 ; ============================================================
-1 (-0.11 % of base) - System.Numerics.Tensors.ReadOnlyTensorSpan`1[int]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this
 ; Assembly listing for method System.Numerics.Tensors.ReadOnlyTensorSpan`1[int]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
 ; Emitting BLENDED_CODE for X64 with AVX512 - Unix
 ; FullOpts code
 ; optimized code
 ; rbp based frame
 ; fully interruptible
 ; No PGO data
 ; 0 inlinees with PGO data; 20 single block inlinees; 10 inlinees without PGO data
 ; Final local variable assignments
 ;
 ;  V00 this         [V00,T11] (  5,  3.50)   byref  ->  [rbp-0xB8]  this single-def
 ;  V01 arg1         [V01,T06] ( 14,  8.50)     ref  ->  r14         class-hnd single-def <System.Array>
 ;* V02 arg2         [V02    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op single-def <System.ReadOnlySpan`1[System.Buffers.NIndex]>
 ;* V03 arg3         [V03    ] (  0,  0   )  struct (16) zero-ref    multireg-arg multireg-ret ld-addr-op <System.ReadOnlySpan`1[long]>
 ;* V04 arg4         [V04    ] (  0,  0   )  struct (16) zero-ref    multireg-arg ld-addr-op single-def <System.ReadOnlySpan`1[long]>
 ;* V05 loc0         [V05    ] (  0,  0   )    long  ->  zero-ref    single-def
 ;  V06 loc1         [V06,T21] (  4,  2   )    long  ->  [rbp-0x30]  spill-single-def
 ;* V07 loc2         [V07    ] (  0,  0   )    long  ->  zero-ref    single-def
 ;* V08 loc3         [V08    ] (  0,  0   )  struct (16) zero-ref    multireg-arg <System.Span`1[long]>
 ;* V09 loc4         [V09    ] (  0,  0   )     int  ->  zero-ref    single-def
 ;# V10 OutArgs      [V10    ] (  1,  1   )  struct ( 0) [rsp+0x00]  do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
 ;* V11 tmp1         [V11    ] (  0,  0   )  struct (16) zero-ref    multireg-arg <System.ReadOnlySpan`1[long]>
 ;  V12 tmp2         [V12    ] (  2,  2   )  struct (104) [rbp-0x98]  do-not-enreg[XS] must-init addr-exposed ld-addr-op "NewObj constructor temp" <System.Numerics.Tensors.TensorShape>
 ;  V13 tmp3         [V13,T16] (  3,  3   )     ref  ->  rax         class-hnd exact single-def "NewArr temp" <long[]>
 ;* V14 tmp4         [V14    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.Span`1[long]>
 ;  V15 tmp5         [V15,T41] (  2,  1   )     int  ->  rdi         "Inline return value spill temp"
 ;* V16 tmp6         [V16    ] (  0,  0   )     int  ->  zero-ref    single-def "Inline stloc first use temp"
 ;  V17 tmp7         [V17,T18] (  3,  3   )     int  ->  rdi         "impAppendStmt"
 ;  V18 tmp8         [V18,T26] (  2,  2   )   byref  ->  rsi         single-def "Inlining Arg"
 ;  V19 tmp9         [V19,T22] (  4,  2   )     int  ->  rsi         "Inline return value spill temp"
 ;* V20 tmp10        [V20    ] (  0,  0   )     int  ->  zero-ref    single-def "Inline stloc first use temp"
 ;  V21 tmp11        [V21,T19] (  3,  3   )     int  ->  rsi         "impAppendStmt"
 ;* V22 tmp12        [V22,T45] (  0,  0   )   byref  ->  zero-ref    single-def "Inlining Arg"
 ;  V23 tmp13        [V23,T28] (  2,  2   )    long  ->  rdi         "Inlining Arg"
 ;  V24 tmp14        [V24,T42] (  2,  1   )     int  ->  rsi         "Inline return value spill temp"
 ;* V25 tmp15        [V25    ] (  0,  0   )     int  ->  zero-ref    single-def "Inline stloc first use temp"
 ;  V26 tmp16        [V26,T29] (  2,  2   )     int  ->  rsi         "impAppendStmt"
 ;* V27 tmp17        [V27,T46] (  0,  0   )   byref  ->  zero-ref    single-def "Inlining Arg"
 ;* V28 tmp18        [V28    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.Span`1[long]>
 ;  V29 tmp19        [V29,T23] (  4,  2   )    long  ->  [rbp-0xA0]  "Inline return value spill temp"
 ;* V30 tmp20        [V30    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.ReadOnlySpan`1[long]>
 ;  V31 tmp21        [V31,T07] (  5,  9.25)    long  ->  rdi         "Inline stloc first use temp"
 ;* V32 tmp22        [V32,T52] (  0,  0   )     int  ->  zero-ref    "Inline stloc first use temp"
 ;  V33 tmp23        [V33,T17] (  3,  3   )     ref  ->  [rbp-0xC0]  class-hnd exact spill-single-def "Inlining Arg" <System.RuntimeType>
 ;  V34 tmp24        [V34,T38] (  2,  1   )     ref  ->  rax         class-hnd "Inline return value spill temp" <System.RuntimeType>
 ;  V35 tmp25        [V35,T24] (  4,  2   )    long  ->  [rbp-0xA8]  spill-single-def "Inline stloc first use temp"
 ;* V36 tmp26        [V36    ] (  0,  0   )     ref  ->  zero-ref    class-hnd exact single-def "impAppendStmt" <System.RuntimeType>
 ;  V37 tmp27        [V37,T27] (  2,  2   )     ref  ->  rax         class-hnd exact single-def "dup spill" <System.RuntimeType>
 ;  V38 tmp28        [V38,T20] (  4,  2   )     ref  ->  rax        
 ;  V39 tmp29        [V39,T12] (  4,  4   )     ref  ->  rax         class-hnd single-def "Inlining Arg" <long[]>
 ;* V40 tmp30        [V40    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "NewObj constructor temp" <System.ReadOnlySpan`1[long]>
 ;  V41 tmp31        [V41,T08] (  4,  9   )    long  ->  rsi         "Inline stloc first use temp"
 ;  V42 tmp32        [V42,T00] (  6, 20.50)     int  ->  rdx         "Inline stloc first use temp"
 ;* V43 tmp33        [V43    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.ReadOnlySpan`1[long]>
 ;* V44 tmp34        [V44    ] (  0,  0   )  struct (16) zero-ref    ld-addr-op "Inlining Arg" <System.ReadOnlySpan`1[long]>
 ;  V45 tmp35        [V45,T14] (  2,  1.50)   byref  ->  [rbp-0xC8]  single-def "field V02._reference (fldOffset=0x0)" P-INDEP
 ;  V46 tmp36        [V46,T13] (  3,  2   )     int  ->  [rbp-0xAC]  single-def "field V02._length (fldOffset=0x8)" P-INDEP
 ;  V47 tmp37        [V47,T03] (  7, 11   )   byref  ->  r15         single-def "field V03._reference (fldOffset=0x0)" P-INDEP
 ;  V48 tmp38        [V48,T02] ( 10, 13.50)     int  ->  rbx         single-def "field V03._length (fldOffset=0x8)" P-INDEP
 ;  V49 tmp39        [V49,T10] (  5,  6   )   byref  ->  r12         "field V04._reference (fldOffset=0x0)" P-INDEP
 ;  V50 tmp40        [V50,T09] (  6,  6.50)     int  ->  r13         "field V04._length (fldOffset=0x8)" P-INDEP
 ;  V51 tmp41        [V51,T31] (  3,  1.50)   byref  ->  rdi         "field V08._reference (fldOffset=0x0)" P-INDEP
 ;  V52 tmp42        [V52,T34] (  3,  1.50)     int  ->  rsi         "field V08._length (fldOffset=0x8)" P-INDEP
 ;  V53 tmp43        [V53,T32] (  3,  1.50)   byref  ->  rdi         "field V11._reference (fldOffset=0x0)" P-INDEP
 ;  V54 tmp44        [V54,T35] (  3,  1.50)     int  ->  rsi         "field V11._length (fldOffset=0x8)" P-INDEP
 ;  V55 tmp45        [V55,T39] (  2,  1   )   byref  ->  rdi         single-def "field V14._reference (fldOffset=0x0)" P-INDEP
 ;  V56 tmp46        [V56,T43] (  2,  1   )     int  ->  rsi         single-def "field V14._length (fldOffset=0x8)" P-INDEP
 ;  V57 tmp47        [V57,T40] (  2,  1   )   byref  ->  rdi         "field V28._reference (fldOffset=0x0)" P-INDEP
 ;  V58 tmp48        [V58,T44] (  2,  1   )     int  ->  rsi         "field V28._length (fldOffset=0x8)" P-INDEP
 ;* V59 tmp49        [V59,T47] (  0,  0   )   byref  ->  zero-ref    single-def "field V30._reference (fldOffset=0x0)" P-INDEP
 ;  V60 tmp50        [V60,T30] (  2,  2   )     int  ->  rdi         single-def "field V30._length (fldOffset=0x8)" P-INDEP
 ;  V61 tmp51        [V61,T33] (  3,  1.50)   byref  ->  rdi         "field V40._reference (fldOffset=0x0)" P-INDEP
 ;  V62 tmp52        [V62,T36] (  3,  1.50)     int  ->  rsi         "field V40._length (fldOffset=0x8)" P-INDEP
 ;* V63 tmp53        [V63,T48] (  0,  0   )   byref  ->  zero-ref    single-def "field V43._reference (fldOffset=0x0)" P-INDEP
 ;* V64 tmp54        [V64,T50] (  0,  0   )     int  ->  zero-ref    single-def "field V43._length (fldOffset=0x8)" P-INDEP
 ;* V65 tmp55        [V65,T49] (  0,  0   )   byref  ->  zero-ref    single-def "field V44._reference (fldOffset=0x0)" P-INDEP
 ;* V66 tmp56        [V66,T51] (  0,  0   )     int  ->  zero-ref    single-def "field V44._length (fldOffset=0x8)" P-INDEP
 ;  V67 GsCookie     [V67    ] (  1,  1   )    long  ->  [rbp-0xD0]  do-not-enreg[X] addr-exposed "GSSecurityCookie"
 ;  V68 cse0         [V68,T25] (  4,  2   )     int  ->  rsi         "CSE #04: conservative"
 ;  V69 cse1         [V69,T04] (  3, 12   )    long  ->   r8         "CSE #07: aggressive"
-;  V70 cse2         [V70,T37] (  3,  1.50)     int  ->  rdx         "CSE #10: conservative"
+;  V70 cse2         [V70,T37] (  3,  1.50)    long  ->  rdx         "CSE #11: conservative"
 ;  V71 cse3         [V71,T15] (  4,  2   )    long  ->  rsi         multi-def "CSE #01: moderate"
 ;  V72 cse4         [V72,T05] (  3, 12   )    long  ->  rcx         "CSE #08: aggressive"
 ;  V73 rat0         [V73,T01] (  5, 16.25)    long  ->  rsi         "Widened IV V32"
 ;
 ; Lcl frame size = 168
 
 G_M51193_IG01:
        push     rbp
        push     r15
        push     r14
        push     r13
        push     r12
        push     rbx
        sub      rsp, 168
        lea      rbp, [rsp+0xD0]
        xor      eax, eax
        mov      qword ptr [rbp-0x98], rax
        vxorps   xmm8, xmm8, xmm8
        vmovdqu32 zmmword ptr [rbp-0x90], zmm8
        vmovdqa  xmmword ptr [rbp-0x50], xmm8
        vmovdqa  xmmword ptr [rbp-0x40], xmm8
        mov      qword ptr [rbp-0xD0], 0xD1FFAB1E
        mov      bword ptr [rbp-0xB8], rdi
        mov      bword ptr [rbp-0xC8], rdx
        mov      dword ptr [rbp-0xAC], ecx
        mov      r14, rsi
        mov      r15, r8
        mov      ebx, r9d
        mov      r12, bword ptr [rbp+0x10]
        mov      r13d, dword ptr [rbp+0x18]
 						;; size=107 bbWeight=1 PerfScore 21.08
 G_M51193_IG02:
        test     ebx, ebx
        jne      G_M51193_IG08
 						;; size=8 bbWeight=1 PerfScore 1.25
 G_M51193_IG03:
        test     r14, r14
        je       G_M51193_IG08
        mov      rsi, qword ptr [r14]
        mov      esi, dword ptr [rsi+0x04]
        add      esi, -24
        shr      esi, 3
        mov      edi, esi
        test     edi, edi
        je       SHORT G_M51193_IG04
        cmp      edi, 8
        jle      SHORT G_M51193_IG04
        movsxd   rsi, esi
        mov      rdi, 0xD1FFAB1E      ; long[]
        call     CORINFO_HELP_NEWARR_1_VC
        lea      rdi, bword ptr [rax+0x10]
        mov      esi, dword ptr [rax+0x08]
        jmp      SHORT G_M51193_IG07
        align    [14 bytes for IG10]
 						;; size=73 bbWeight=0.50 PerfScore 7.38
 G_M51193_IG04:
        mov      edi, 1
        test     esi, esi
        cmove    esi, edi
        mov      edi, esi
        mov      r8d, 8
        mov      rax, rdi
        mul      rdx:rax, r8
        jb       G_M51193_IG30
        mov      rdi, rax
        test     rdi, rdi
        je       SHORT G_M51193_IG06
        add      rdi, 15
        shr      rdi, 4
 						;; size=46 bbWeight=0.50 PerfScore 3.88
 G_M51193_IG05:
        push     0
        push     0
        dec      rdi
        jne      SHORT G_M51193_IG05
        lea      rdi, [rsp]
 						;; size=13 bbWeight=0.50 PerfScore 1.88
 G_M51193_IG06:
        test     esi, esi
        jl       G_M51193_IG28
 						;; size=8 bbWeight=0.50 PerfScore 0.62
 G_M51193_IG07:
        mov      rdx, r14
        mov      rax, 0xD1FFAB1E      ; code for System.Numerics.Tensors.TensorSpanHelpers:FillLengths(System.Span`1[long],System.Array):System.ReadOnlySpan`1[long]
        call     [rax]System.Numerics.Tensors.TensorSpanHelpers:FillLengths(System.Span`1[long],System.Array):System.ReadOnlySpan`1[long]
        mov      r15, rax
        mov      ebx, edx
 						;; size=20 bbWeight=0.50 PerfScore 2.00
 G_M51193_IG08:
        mov      edi, ebx
        test     edi, edi
        je       SHORT G_M51193_IG12
 						;; size=6 bbWeight=1 PerfScore 1.50
 G_M51193_IG09:
        mov      edi, 1
        xor      esi, esi
 						;; size=7 bbWeight=0.25 PerfScore 0.12
 G_M51193_IG10:
        mov      r8, qword ptr [r15+8*rsi]
        test     r8, r8
        jl       G_M51193_IG27
        imul     rdi, r8
        inc      esi
        cmp      esi, ebx
        jl       SHORT G_M51193_IG10
 						;; size=23 bbWeight=4 PerfScore 27.00
 G_M51193_IG11:
        test     rdi, rdi
        jl       G_M51193_IG27
        mov      rsi, rdi
        mov      qword ptr [rbp-0xA0], rsi
        jmp      SHORT G_M51193_IG13
        align    [0 bytes for IG20]
 						;; size=21 bbWeight=0.50 PerfScore 2.25
 G_M51193_IG12:
        xor      esi, esi
        mov      qword ptr [rbp-0xA0], rsi
 						;; size=9 bbWeight=0.50 PerfScore 0.62
 G_M51193_IG13:
        test     r14, r14
        je       G_M51193_IG22
 						;; size=9 bbWeight=1 PerfScore 1.25
 G_M51193_IG14:
        mov      rdi, r14
        mov      r8, 0xD1FFAB1E      ; code for System.Object:GetType():System.Type:this
        call     [r8]System.Object:GetType():System.Type:this
        mov      gword ptr [rbp-0xC0], rax
        mov      rdi, qword ptr [rax+0x18]
        call     System.RuntimeTypeHandle:GetElementTypeHandle(long):long
        mov      qword ptr [rbp-0xA8], rax
        test     rax, rax
        je       G_M51193_IG26
        mov      rdi, rax
        call     System.RuntimeTypeHandle:GetRuntimeTypeFromHandleIfExists(long):System.RuntimeType
        test     rax, rax
        jne      SHORT G_M51193_IG15
        mov      rdi, qword ptr [rbp-0xA8]
        mov      rax, 0xD1FFAB1E      ; code for System.RuntimeTypeHandle:GetRuntimeTypeFromHandleSlow(long):System.RuntimeType
        call     [rax]System.RuntimeTypeHandle:GetRuntimeTypeFromHandleSlow(long):System.RuntimeType
 						;; size=80 bbWeight=0.50 PerfScore 8.25
 G_M51193_IG15:
        mov      rdi, 0xD1FFAB1E      ; 'System.Int32'
        cmp      rax, rdi
        jne      G_M51193_IG26
        test     r13d, r13d
        jne      SHORT G_M51193_IG18
        mov      rdi, r15
        mov      esi, ebx
        mov      rdx, qword ptr [rbp-0xA0]
        mov      rax, 0xD1FFAB1E      ; code for System.Numerics.Tensors.TensorSpanHelpers:CalculateStrides(System.ReadOnlySpan`1[long],long):long[]
        call     [rax]System.Numerics.Tensors.TensorSpanHelpers:CalculateStrides(System.ReadOnlySpan`1[long],long):long[]
        test     rax, rax
        je       SHORT G_M51193_IG16
        lea      rdi, bword ptr [rax+0x10]
        mov      esi, dword ptr [rax+0x08]
        jmp      SHORT G_M51193_IG17
 						;; size=62 bbWeight=0.50 PerfScore 6.62
 G_M51193_IG16:
        xor      rdi, rdi
        xor      esi, esi
 						;; size=4 bbWeight=0.50 PerfScore 0.25
 G_M51193_IG17:
        jmp      SHORT G_M51193_IG19
 						;; size=2 bbWeight=0.50 PerfScore 1.00
 G_M51193_IG18:
        mov      rdi, r12
        mov      esi, r13d
 						;; size=6 bbWeight=0.50 PerfScore 0.25
 G_M51193_IG19:
        mov      r12, rdi
        mov      r13d, esi
        mov      rdi, r12
        mov      esi, r13d
        mov      rdx, r15
        mov      ecx, ebx
        mov      rax, 0xD1FFAB1E      ; code for System.Numerics.Tensors.TensorSpanHelpers:ValidateStrides(System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long])
        call     [rax]System.Numerics.Tensors.TensorSpanHelpers:ValidateStrides(System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long])
        mov      rsi, bword ptr [rbp-0xC8]
        mov      edx, dword ptr [rbp-0xAC]
        mov      rdi, r14
        mov      rax, 0xD1FFAB1E      ; code for System.Numerics.Tensors.TensorSpanHelpers:ComputeStartOffsetSystemArray(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex]):long
        call     [rax]System.Numerics.Tensors.TensorSpanHelpers:ComputeStartOffsetSystemArray(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex]):long
        mov      qword ptr [rbp-0x30], rax
        xor      esi, esi
        xor      edx, edx
        test     ebx, ebx
        jle      SHORT G_M51193_IG21
 						;; size=69 bbWeight=0.50 PerfScore 6.50
 G_M51193_IG20:
        cmp      edx, r13d
        jae      G_M51193_IG29
        mov      ecx, edx
        mov      r8, qword ptr [r12+8*rcx]
        mov      rcx, qword ptr [r15+8*rcx]
        dec      rcx
        imul     rcx, r8
        add      rsi, rcx
        inc      edx
        cmp      edx, ebx
        jl       SHORT G_M51193_IG20
 						;; size=35 bbWeight=4 PerfScore 38.00
 G_M51193_IG21:
        mov      edx, eax
        mov      esi, esi
        add      rsi, rdx
        mov      edx, dword ptr [r14+0x08]
        test     edx, edx
        jl       G_M51193_IG30
-       mov      ecx, edx
-       cmp      rsi, rcx
+       cmp      rsi, rdx
        ja       G_M51193_IG27
-       mov      esi, edx
+       mov      rsi, rdx
        sub      rsi, rax
        mov      rdx, r15
        mov      ecx, ebx
        mov      r8, r12
        mov      r9d, r13d
        lea      rdi, [rbp-0x98]
        mov      r10, 0xD1FFAB1E      ; code for System.Numerics.Tensors.TensorShape:.ctor(long,System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this
        call     [r10]System.Numerics.Tensors.TensorShape:.ctor(long,System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this
        mov      rbx, bword ptr [rbp-0xB8]
        lea      rdi, bword ptr [rbx+0x08]
        lea      rsi, bword ptr [rbp-0x98]
        call     CORINFO_HELP_ASSIGN_BYREF
        mov      ecx, 12
        rep movsq 
        lea      rax, bword ptr [r14+0x08]
        mov      rsi, qword ptr [r14]
        mov      ecx, dword ptr [rsi+0x04]
        add      rcx, -16
        add      rax, rcx
        mov      ecx, dword ptr [rbp-0x30]
        shl      rcx, 2
        add      rax, rcx
        mov      bword ptr [rbx], rax
        jmp      SHORT G_M51193_IG23
-						;; size=129 bbWeight=0.50 PerfScore 24.38
+						;; size=128 bbWeight=0.50 PerfScore 24.25
 G_M51193_IG22:
        cmp      dword ptr [rbp-0xAC], 0
        jne      SHORT G_M51193_IG27
        cmp      qword ptr [rbp-0xA0], 0
        jne      SHORT G_M51193_IG27
        xor      ecx, ecx
        mov      rax, bword ptr [rbp-0xB8]
        mov      qword ptr [rax], rcx
        mov      qword ptr [rax+0x08], rcx
        vxorps   xmm0, xmm0, xmm0
        vmovdqu32 zmmword ptr [rax+0x10], zmm0
        vmovdqu  ymmword ptr [rax+0x50], ymm0
 						;; size=54 bbWeight=0.50 PerfScore 6.79
 G_M51193_IG23:
        cmp      qword ptr [rbp-0xD0], 0xD1FFAB1E
        je       SHORT G_M51193_IG24
        call     CORINFO_HELP_FAIL_FAST
 						;; size=18 bbWeight=1 PerfScore 4.00
 G_M51193_IG24:
        nop      
 						;; size=1 bbWeight=1 PerfScore 0.25
 G_M51193_IG25:
        lea      rsp, [rbp-0x28]
        pop      rbx
        pop      r12
        pop      r13
        pop      r14
        pop      r15
        pop      rbp
        ret      
 						;; size=15 bbWeight=1 PerfScore 4.50
 G_M51193_IG26:
        mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArrayTypeMismatchException()
        call     [rax]System.ThrowHelper:ThrowArrayTypeMismatchException()
        int3     
 						;; size=13 bbWeight=0 PerfScore 0.00
 G_M51193_IG27:
        mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
        call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
        int3     
 						;; size=13 bbWeight=0 PerfScore 0.00
 G_M51193_IG28:
        mov      rax, 0xD1FFAB1E      ; code for System.ThrowHelper:ThrowArgumentOutOfRangeException()
        call     [rax]System.ThrowHelper:ThrowArgumentOutOfRangeException()
        int3     
 						;; size=13 bbWeight=0 PerfScore 0.00
 G_M51193_IG29:
        call     CORINFO_HELP_RNGCHKFAIL
        int3     
 						;; size=6 bbWeight=0 PerfScore 0.00
 G_M51193_IG30:
        call     CORINFO_HELP_OVERFLOW
        int3     
 						;; size=6 bbWeight=0 PerfScore 0.00
 
-; Total bytes of code 876, prolog size 107, PerfScore 171.63, instruction count 225, allocated bytes for code 876 (MethodHash=f2973806) for method System.Numerics.Tensors.ReadOnlyTensorSpan`1[int]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
+; Total bytes of code 875, prolog size 107, PerfScore 171.50, instruction count 224, allocated bytes for code 875 (MethodHash=f2973806) for method System.Numerics.Tensors.ReadOnlyTensorSpan`1[int]:.ctor(System.Array,System.ReadOnlySpan`1[System.Buffers.NIndex],System.ReadOnlySpan`1[long],System.ReadOnlySpan`1[long]):this (FullOpts)
 ; ============================================================

Larger list of diffs: https://gist.github.com/MihuBot/9b9d31e71371da90f33bcd5b0d460d6a

@MihuBot
Copy link
Owner Author

MihuBot commented Dec 15, 2024

@xtqqczze

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant