]> granicus.if.org Git - llvm/commit
[ARM][LowOverheadLoops] Correct offset checking
authorSam Parker <sam.parker@arm.com>
Thu, 11 Jul 2019 09:56:15 +0000 (09:56 +0000)
committerSam Parker <sam.parker@arm.com>
Thu, 11 Jul 2019 09:56:15 +0000 (09:56 +0000)
commit3423b03f7bd975f41d102f2a8ef01ce28db11672
tree9249a56155b33c8a99ad6a914e8f29346aebdd27
parentaa8be082019f3c535ae335f144a0270fcb9c657a
[ARM][LowOverheadLoops] Correct offset checking

This patch addresses a couple of problems:
1) The maximum supported offset of LE is -4094.
2) The offset of WLS also needs to be checked, this uses a
   maximum positive offset of 4094.

The use of BasicBlockUtils has been changed because the block offsets
weren't being initialised, but the isBBInRange checks both positive
and negative offsets.

ARMISelLowering has been tweaked because the test case presented
another pattern that we weren't supporting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365749 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBasicBlockInfo.h
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMLowOverheadLoops.cpp
test/CodeGen/Thumb2/LowOverheadLoops/end-positive-offset.mir [new file with mode: 0644]
test/CodeGen/Thumb2/LowOverheadLoops/size-limit.mir
test/CodeGen/Thumb2/LowOverheadLoops/while-negative-offset.mir [new file with mode: 0644]