Move and-cmp-test transform from TreeNodeInfoInitCmp to LowerCompare
FX diff shows a 32 bytes improvement without any regressions. Previously the first GT_AND operand wasn't marked reg optional and sometimes it ended up being loaded into a register:
mov eax, dword ptr [rsp+B0H]
test eax, 1
Not anymore:
test dword ptr [rsp+B0H], 1
Also, we now generate TEST instead of AND even in cases where the second AND operand isn't a containable constant.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a909bec98f796a4136a9d4ea955013ebf574703c