The changes to allow ldr rd, =immediate to be transformed into a MOV
http://reviews.llvm.org/D20153
http://reviews.llvm.org/D20154
http://reviews.llvm.org/D20155
caused a regression from LLVM 3.8 as they have no support for the ldr.w rd, =immediate form in Thumb 2 whereas 3.8 did. In ARM the .w is silently ignored by the parser so this problem is restricted to Thumb2.
This patch adds support for ldr.w rd, =immediate for Thumb 2. I've followed the form of the t2LDRpcrel family and added a t2InstAlias for the .w form. This will cause the parser to add an extra operand ".w" that the ARMAsmParser.cpp code has to account for.
Fixes PR30352
shouldn't you also check that the .Ltmp symbol has a .word with the right value?