Lower ARM adds/subs to add/sub after adding optional CPSR operand.
authorAndrew Trick <atrick@apple.com>
Wed, 21 Sep 2011 02:20:46 +0000 (02:20 +0000)
committerAndrew Trick <atrick@apple.com>
Wed, 21 Sep 2011 02:20:46 +0000 (02:20 +0000)
commit3be654f8082dcbdff011a6716a7c90486e28fc9e
treec8ed3778b0094ee060135ae967ad30fd478c7635
parente23dc9c0ef50b0a1934c04c1786f3a0478d62f41
Lower ARM adds/subs to add/sub after adding optional CPSR operand.

This is still a hack until we can teach tblgen to generate the
optional CPSR operand rather than an implicit CPSR def. But the
strangeness is now limited to the selection DAG. ADD/SUB MI's no
longer have implicit CPSR defs, nor do we allow flag setting variants
of these opcodes in machine code. There are several corner cases to
consider, and getting one wrong would previously lead to nasty
miscompilation. It's not the first time I've debugged one, so this
time I added enough verification to ensure it won't happen again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140228 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetInstrInfo.h
lib/CodeGen/MachineVerifier.cpp
lib/CodeGen/SelectionDAG/InstrEmitter.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/Target/ARM/ARMAsmPrinter.cpp
lib/Target/ARM/ARMBaseInstrInfo.cpp
lib/Target/ARM/ARMBaseInstrInfo.h
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrThumb2.td