Don't fold insufficiently aligned ldr/str into ldm/stm instructions.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 14 Jan 2010 00:54:10 +0000 (00:54 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 14 Jan 2010 00:54:10 +0000 (00:54 +0000)
commit069e100f9a79a63db177a521fd790f4d77d1209c
treee18a2e5782f83df4d10f5570cb72ff18e7be6bec
parentb7eaa130d05347b6e84fd25f1f59f85681be1ede
Don't fold insufficiently aligned ldr/str into ldm/stm instructions.

An unaligned ldr causes a trap, and is then emulated by the kernel with
awesome performance. The darwin kernel does not emulate unaligned ldm/stm
Thumb2 instructions, so don't generate them.

This fixes the miscompilation of Multisource/Applications/JM/lencod for Thumb2.

Generating unaligned ldr/str pairs from a 16-bit aligned memcpy is probably
also a bad idea, but that is beyond the scope of this patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93393 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMLoadStoreOptimizer.cpp