-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
dotnet/coreclr
#27113Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionsoptimizationtenet-performancePerformance related issuePerformance related issue
Milestone
Description
Repro:
using System;
class Program
{
public static void Main()
{
var arr = new int[20];
var s0 = new Span<int>(arr, 0, 1);
var s1 = new Span<int>(arr, 1, 1);
var s2 = new Span<int>(arr, 2, 1);
var s3 = new Span<int>(arr, 3, 1);
var s4 = new Span<int>(arr, 4, 1);
var s5 = new Span<int>(arr, 5, 1);
}
}The generated asm includes this at the end:
G_M45847_IG05:
E84B8ECC5D call System.ThrowHelper:ThrowArgumentOutOfRangeException()
G_M45847_IG06:
E8468ECC5D call System.ThrowHelper:ThrowArgumentOutOfRangeException()
G_M45847_IG07:
E8418ECC5D call System.ThrowHelper:ThrowArgumentOutOfRangeException()
G_M45847_IG08:
E83C8ECC5D call System.ThrowHelper:ThrowArgumentOutOfRangeException()
G_M45847_IG09:
E8378ECC5D call System.ThrowHelper:ThrowArgumentOutOfRangeException()
G_M45847_IG10:
E8328ECC5D call System.ThrowHelper:ThrowArgumentOutOfRangeException()
CC int3
Can/should these be coalesced into a common call point?
category:cq
theme:basic-cq
skill-level:expert
cost:medium
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionsoptimizationtenet-performancePerformance related issuePerformance related issue