[ARM] Use mov operand if the mov cannot be moved while tail predicating
authorSam Tebbs <samuel.tebbs@arm.com>
Mon, 17 Aug 2020 15:03:55 +0000 (16:03 +0100)
committerSam Tebbs <samuel.tebbs@arm.com>
Tue, 18 Aug 2020 16:10:29 +0000 (17:10 +0100)
commit31f02ac60aa8e89c04617e82fa2b1140e33e824d
tree40fcdba3e2cc20b1d309405c81d60e24330e2a49
parentcc98a0fbe46511ebcbca5600c9ec49901469ae3d
[ARM] Use mov operand if the mov cannot be moved while tail predicating

There are some cases where the instruction that sets up the iteration
count for a tail predicated loop cannot be moved before the dlstp,
stopping tail predication entirely. This patch checks if the mov operand
can be used and if so, uses that instead.

Differential Revision: https://reviews.llvm.org/D86087
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
llvm/test/CodeGen/Thumb2/LowOverheadLoops/mov-after-dlstp.mir [new file with mode: 0644]
llvm/test/CodeGen/Thumb2/LowOverheadLoops/mov-operand.ll [new file with mode: 0644]