[ARM][LowOverheadLoops] Use subs during revert.
authorSam Parker <sam.parker@arm.com>
Mon, 23 Sep 2019 08:57:50 +0000 (08:57 +0000)
committerSam Parker <sam.parker@arm.com>
Mon, 23 Sep 2019 08:57:50 +0000 (08:57 +0000)
commit4ba6d0ded2303881bb09ed606970c6c910d183c1
tree79fd484340867dd2c8aba9df100e024b5ee8e312
parent046a16b8fb431458c4bac30b9e9604e2c833354d
[ARM][LowOverheadLoops] Use subs during revert.

Check whether there are any uses or defs between the LoopDec and
LoopEnd. If there's not, then we can use a subs to set the cpsr and
skip generating a cmp.

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

llvm-svn: 372560
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
llvm/test/CodeGen/Thumb2/LowOverheadLoops/branch-targets.ll
llvm/test/CodeGen/Thumb2/LowOverheadLoops/end-positive-offset.mir
llvm/test/CodeGen/Thumb2/LowOverheadLoops/revert-non-header.mir
llvm/test/CodeGen/Thumb2/LowOverheadLoops/revert-while.mir