Handle small memory compares against 0
The previous commit missed the TYP_BOOL case that the original code handled. But then the original code failed to do this thinking that "test" will be used. But that means we end up with a "movzx" as well:
movzx rax, byte ptr [rsi+24]
test eax, eax
instead of just
cmp byte ptr [rsi+24], 0
The Intel manual actually recomends against using the "cmp mem, imm" form but not if other instructions need to be added. This may warrant further investigation though.
FX diff shows a 7579 bytes improvement without any regressions.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9bc2e775a85667fa85a1254fa4138fb98f417543