]> granicus.if.org Git - llvm/commit
[ARM][LowOverheadLoops] Fix generated code for "revert".
authorEli Friedman <efriedma@quicinc.com>
Thu, 15 Aug 2019 23:35:53 +0000 (23:35 +0000)
committerEli Friedman <efriedma@quicinc.com>
Thu, 15 Aug 2019 23:35:53 +0000 (23:35 +0000)
commit90dcbec6f720c46eed750aca1aeba3f3a1dca8d7
tree3b8afc75f67d8dbd6d11548a1fb6038e565bad95
parent79bbc06b14d4cdb0b8b7af57fb5746ef8ce6ca72
[ARM][LowOverheadLoops] Fix generated code for "revert".

Two issues:

1. t2CMPri shouldn't use CPSR if it isn't predicated. This doesn't
really have any visible effect at the moment, but it might matter in the
future.
2. The t2CMPri generated for t2WhileLoopStart might need to use a
register that isn't LR.

My team found this because we have a patch to track register liveness
late in the pass pipeline. I'll look into upstreaming it to help catch
issues like this earlier.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369069 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMLowOverheadLoops.cpp
test/CodeGen/Thumb2/LowOverheadLoops/end-positive-offset.mir
test/CodeGen/Thumb2/LowOverheadLoops/revert-non-loop.mir
test/CodeGen/Thumb2/LowOverheadLoops/revert-while.mir