-
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 SuperPMIhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Milestone
Description
public static bool CheckLetterOrDigit(int uc)
{
return (LetterOrDigitCategories & (1 << uc)) != 0;
}L0000: mov eax, 1
L0005: shlx eax, eax, ecx
L000a: test eax, 0x11f
L000f: setne al
L0012: movzx eax, al
L0015: retpublic static bool CheckLetterOrDigit(int mask, int uc)
{
return (mask & (1 << uc)) != 0;
}L0000: bt ecx, edx
L0003: setb al
L0006: movzx eax, al
L0009: retA more complete example sharplab where
L0032: mov eax, 1
L0037: shlx eax, eax, edx
L003c: test eax, 0x11f
L0041: je short L0056could be optimized to
L0032: mov eax, 0x11f
L0037: bt eax, edx
L003a: jae short L0056MineCake147E
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 SuperPMIhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged