Fixes https://github.com/dotnet/coreclr/issues/5955
When merging two boolean operations (cmp/jmp) in optOptimizeBools, JIT
creates type based on operand type.
There is a case the operand type is bool (1 byte) so JIT creates a tree
that does 1 byte operation which arm64 cannot encode.
The fix is to bail out such case for arm in general.
This passes all 1375 tests in System.Net.Http.Unit.Tests.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1ba04a0d6deaae6152c816bbde33430fd73b088a
continue;
if (genTypeSize(t1->TypeGet()) != genTypeSize(t2->TypeGet()))
continue;
-
+#ifdef _TARGET_ARMARCH_
+ // Skip the small operand which we cannot encode.
+ if (varTypeIsSmall(c1->TypeGet()))
+ continue;
+#endif
/* The second condition must not contain side effects */
if (c2->gtFlags & GTF_GLOB_EFFECT)