ARM: make Thumb1 instructions non-flag-setting in IT block.
authorTim Northover <t.p.northover@gmail.com>
Mon, 27 Jul 2020 13:37:14 +0000 (14:37 +0100)
committerTim Northover <t.p.northover@gmail.com>
Tue, 28 Jul 2020 12:31:17 +0000 (13:31 +0100)
commit39108f4c7a2c52be88f73bd6abaa613f4b28d327
tree7b6a1305ea0e22f1cec2de6932c5e309851e3ee7
parent6d10d317d8b0f1975dbb17850efd7c069f6ee8fd
ARM: make Thumb1 instructions non-flag-setting in IT block.

Many Thumb1 instructions are defined to set CPSR if executed outside an IT
block, but leave it alone from inside one. In MachineIR this is represented by
whether an optional register is CPSR or NoReg (0), and affects how the
instructions are printed.

This sets the instruction to the appropriate form during if-conversion.
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/lib/Target/ARM/ARMInstrFormats.td
llvm/test/CodeGen/ARM/thumb2-it-block.ll
llvm/test/CodeGen/Thumb2/ifcvt-rescan-diamonds.ll