Recommit r254694, it was reverted in r254700 to investigate a bot failure.
If we remove the MMOs from Load/Store instructions,
they are treated as volatile. This makes other optimization passes unhappy.
eg. Load/Store Optimization
So, it looks better to merge, not remove.
But if the product of two MMOs count is higher than threshold,
we just remove them for preventing any pathological cases from
causing compile time blowups or overflow.
I don't think you want to have the uint8_t implementation detail leak out of the interface here. Perhaps this should be 'unsigned'?
I'd like to hear from @hfinkel on this detail before I can approve it.