[Thumb] Fix assembler error 'cannot honor width suffix pop {lr}'
authorArtyom Skrobov <Artyom.Skrobov@arm.com>
Mon, 28 Dec 2015 21:40:45 +0000 (21:40 +0000)
committerArtyom Skrobov <Artyom.Skrobov@arm.com>
Mon, 28 Dec 2015 21:40:45 +0000 (21:40 +0000)
commit1714cbd44cd9ab7913ea39921ae6eb37ad985453
tree9e249575a52a9a785b39e8c8a1d6d5fce55a33f3
parenta5063429b2666581df88584093250f5af5a1f8a3
[Thumb] Fix assembler error 'cannot honor width suffix pop {lr}'

Summary:
* avoid generating POP {LR} in Thumb1 epilogues
* combine MOV LR, Rx + BX LR -> BX Rx in a peephole optimization pass
* combine POP {LR} + B + BX LR -> POP {PC} on v5T+

Test cases by Ana Pazos

Differential Revision: http://reviews.llvm.org/D15707

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256523 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMLoadStoreOptimizer.cpp
lib/Target/ARM/Thumb1FrameLowering.cpp
test/CodeGen/Thumb/thumb-shrink-wrapping.ll