The load/store optimiser will convert sequential ldr/str instructions into ldrd/strd and these instructions cannot access unaligned memory.
When generating DSP instructions, we can use ldr/str instructions to load and store packed data but this means that it can be possible for those instructions to be accessing unaligned memory. This is fine for processors which support unaligned accesses, but it is not fine if these instructions are then optimised into ldrd/strd.
This patch modified ARMLoadStoreOpt pass to look through the pointer information to determine if the access size of the memory operation is safe for the optimisation. We now don't perform the transform if the access type is wider than the memory type.
This patch is to support the transformation being performed in D48128.