-
Couldn't load subscription status.
- Fork 5.2k
Closed
Labels
arch-arm64area-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
There are two cases:
Case1:
static bool Case1(int x) => x < 0; // probably also `x >= 0`current codegen:
cmp w0, #0
cset x0, ltexpected codegen:
lsr x0, w0, #31x86-related PR: #35627
Case2 (jump condition):
static void Case2(int a)
{
if (a < 0) // and "a >= 0"
Foo();
}current codegen:
cmp w0, #0
bge G_M29168_IG04expected codegen:
tbnz w0, #31, G_M29168_IG04NOTE: for the second case we already have an optimization for x==0 -> tb(n)z so should be easy to extend.
/cc @kunalspathak @echesakovMSFT
category:cq
theme:codegen
skill-level:intermediate
cost:medium
impact:medium
Metadata
Metadata
Assignees
Labels
arch-arm64area-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