Closed
Description
Noticed in #100999:
void Foo(int x)
{
if ((x & 0xC000000) == 0xC000000)
Console.WriteLine();
}
Codegen on arm64:
and w0, w1, #0xC000000
mov w1, #0xC000000
cmp w0, w1
bne G_M37282_IG05
Expected codegen:
mov w1, #0xC000000
bics wzr, w8, w1
bne G_M37282_IG05
x64 is suboptimal for it as well, current codegen:
and edx, 0xC000000
cmp edx, 0xC000000
jne SHORT G_M37282_IG04
^ should be not + test.