-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
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 SuperPMI
Milestone
Description
should these ideally generate the same code?
static void A(Span<char> chars)
{
if (!chars.IsEmpty)
{
foreach (char c in chars)
{
Console.Write(c);
}
}
}
static void B(Span<char> chars)
{
foreach (char c in chars)
{
Console.Write(c);
}
}currently (well, whatever sharplab uses) the 1st one generates an extra test.
category:cq
theme:redundant-branches
skill-level:expert
cost:medium
impact:low
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 SuperPMI