-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
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
Milestone
Description
C# code:
using System;
class Program {
static int Main(string[] args) {
return Math.Max(args.Length, 42);
}
}
Generated code:
G_M17764_IG01:
G_M17764_IG02:
8B4108 mov eax, dword ptr [rcx+8]
83F82A cmp eax, 42
7D07 jge SHORT G_M17764_IG03
B82A000000 mov eax, 42
EB00 jmp SHORT G_M17764_IG03 ;huh???
G_M17764_IG03:
C3 ret
category:cq
theme:basic-cq
skill-level:intermediate
cost:medium
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