-
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 SuperPMI
Milestone
Description
From: #101153
[MethodImpl(MethodImplOptions.NoInlining)]
static void Foo<T>() => Bar<T>();
[MethodImpl(MethodImplOptions.NoInlining)]
static void Bar<T>() { }
Codegen for Foo<_Canon>
in Tier1:
; Assembly listing for method Prog:Foo[System.__Canon]() (FullOpts)
; FullOpts code
sub rsp, 40
mov qword ptr [rsp+0x20], rcx
mov rdx, qword ptr [rcx+0x38]
mov rdx, qword ptr [rdx+0x10]
test rdx, rdx
je SHORT G_M2381_IG04
jmp SHORT G_M2381_IG05
G_M2381_IG04:
mov rdx, 0x7FFE1F42D630
call CORINFO_HELP_RUNTIMEHANDLE_METHOD
mov rdx, rax
G_M2381_IG05:
mov rcx, rdx
call [Prog:Bar[System.__Canon]()]
nop
add rsp, 40
ret
this block:
test rdx, rdx
je SHORT G_M2381_IG04
jmp SHORT G_M2381_IG05
G_M2381_IG04:
seems like it's better to be re-ordered to:
test rdx, rdx
jne SHORT G_M2381_IG05
G_M2381_IG04:
@amanasifkhalid something you might find interesting to take a look since it's block re-ordering. cc @dotnet/jit-contrib
amanasifkhalid
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