[ARM] Optimize immediate selection
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Wed, 29 Jul 2020 12:13:04 +0000 (13:13 +0100)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Wed, 29 Jul 2020 12:29:17 +0000 (13:29 +0100)
commit85342c27a303e68a4091797e5d7938aa7beb4da5
tree2a1c8ef7bdb9bd99858bf71ca45e8e03a99ff18d
parent200bb5191a35333281ec241b0aa976bb17295043
[ARM] Optimize immediate selection

Optimize some specific immediates selection by materializing them with sub/mvn
instructions as opposed to loading them from the constant pool.

Patch by Ben Shi, powerman1st@163.com.

Differential Revision: https://reviews.llvm.org/D83745
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
llvm/lib/Target/ARM/ARMInstrInfo.td
llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h
llvm/test/CodeGen/ARM/add-sub-imm.ll [new file with mode: 0644]
llvm/test/CodeGen/ARM/select-imm.ll