There are two cases:
Case1:
static bool Case1(int x) => x < 0; // probably also `x >= 0`
current codegen:
expected codegen:
x86-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_IG04
expected codegen:
tbnz w0, #31, G_M29168_IG04
NOTE: 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
There are two cases:
Case1:
current codegen:
expected codegen:
x86-related PR: #35627
Case2 (jump condition):
current codegen:
expected codegen:
NOTE: 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