OSDN Git Service

[ARM] Mark LEApcrel instructions as isAsCheapAsAMove
authorJohn Brawn <john.brawn@arm.com>
Mon, 15 May 2017 11:57:54 +0000 (11:57 +0000)
committerJohn Brawn <john.brawn@arm.com>
Mon, 15 May 2017 11:57:54 +0000 (11:57 +0000)
commit57bb7925b599e8e7dba666e81e446ed05af687c1
treedd617c5ae05ffc45a146a7a96889d0400020fd47
parent91719efd8f00fe7108e323c5fd6da4902f1a1b7b
[ARM] Mark LEApcrel instructions as isAsCheapAsAMove

Doing this means that if an LEApcrel is used in two places we will rematerialize
instead of generating two MOVs. This is particularly useful for printfs using
the same format string, where we want to generate an address into a register
that's going to get corrupted by the call.

Differential Revision: https://reviews.llvm.org/D32858

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303054 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrThumb.td
lib/Target/ARM/ARMInstrThumb2.td
test/CodeGen/ARM/adr-remat.ll [new file with mode: 0644]
test/CodeGen/ARM/align-sp-adjustment.ll