-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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 SuperPMItenet-performancePerformance related issuePerformance related issue
Milestone
Description
int foo(bool cond, int a, int b) => 1 + (cond ? a : b); // or e.g. "cond ? 1 : 2"Current codegen:
; Method Program:foo(bool,int,int):int:this (FullOpts)
test dl, dl
jne SHORT G_M62184_IG04
mov eax, r9d
jmp SHORT G_M62184_IG05
G_M62184_IG04: ;; offset=0x0009
mov eax, r8d
G_M62184_IG05: ;; offset=0x000C
inc eax
ret
; Total bytes of code: 15Expected: branchless code (cmove)
cc @jakobbotsch @dotnet/jit-contrib
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 SuperPMItenet-performancePerformance related issuePerformance related issue