-
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
From #117160 (comment)
(uint byteIndex, uint bitOffset) Test(int index)
{
return Math.DivRem((uint) index, 8);
}
Current codegen:
mov eax, edx
shr eax, 3
lea ecx, [8*rax]
sub edx, ecx
mov ecx, edx
shl rcx, 32
or rax, rcx
ret
; Total bytes of code: 24
Expected codegen:
mov eax, edx
shr eax, 3
and edx, 7
mov ecx, edx
shl rcx, 32
or rax, rcx
ret
; Total bytes of code: 18
stephentoub and BoyBaykiller
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