ARM: allow copying of CPSR when all else fails.
authorTim Northover <tnorthover@apple.com>
Wed, 1 Oct 2014 19:21:03 +0000 (19:21 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 1 Oct 2014 19:21:03 +0000 (19:21 +0000)
commit472f2a056decc9d4cb79a59ca1d59f9f331b7b9d
tree5883bcad44ca4a5cc2f4f6149ca472f7b50ccf8e
parent02474a32eb85f03306ae19d376ee26cf89db4af5
ARM: allow copying of CPSR when all else fails.

As with x86 and AArch64, certain situations can arise where we need to spill
CPSR in the middle of a calculation. These should be avoided where possible
(MRS/MSR is rather expensive), which ARM is actually better at than the other
two since it tries to Glue defs to uses, but as a last ditch effort, copying is
better than crashing.

rdar://problem/18011155

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218789 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseInstrInfo.cpp
lib/Target/ARM/ARMBaseInstrInfo.h
lib/Target/ARM/ARMBaseRegisterInfo.cpp
test/CodeGen/ARM/copy-cpsr.ll [new file with mode: 0644]