Lower thumbv4t & thumbv5 lo->lo copies through a push-pop sequence
authorJonathan Roelofs <jonathan@codesourcery.com>
Wed, 20 Aug 2014 23:38:50 +0000 (23:38 +0000)
committerJonathan Roelofs <jonathan@codesourcery.com>
Wed, 20 Aug 2014 23:38:50 +0000 (23:38 +0000)
commit506ed4d4a5ed65f40e1b2d4b68b5f79883c8c3fa
tree46ef139ddb0f4cd0754455bfe9a0709acf547179
parent400bc218f8798781ea2ff6eb63a5e017ea05d007
Lower thumbv4t & thumbv5 lo->lo copies through a push-pop sequence

On pre-v6 hardware, 'MOV lo, lo' gives undefined results, so such copies need to
be avoided. This patch trades simplicity for implementation time at the expense
of performance... As they say: correctness first, then performance.

See http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-August/075998.html for a few
ideas on how to make this better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216138 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/Thumb1InstrInfo.cpp
test/CodeGen/ARM/atomic-cmpxchg.ll
test/CodeGen/Thumb/copy_thumb.ll [new file with mode: 0644]