Fold away or reduce `and# (extendWordN# x) mask`
We may end up with expressions like:
(GHC.Prim.uncheckedShiftL#
(GHC.Prim.and#
(GHC.Prim.extendWord8 x)
18446744073709551487##)
...)
We know x is of Word8, so we can truncate the mask (0xFFFFFF7F
) to 0x7F
. And subsequently if the mask was 0xFF
we could just drop the and#
altogether, independent if the upper parts of the mask are not set.