[ARM][LowOverheadLoops] Merge a VCMP and the new VPST into a VPT
authorSam Tebbs <samuel.tebbs@arm.com>
Fri, 30 Oct 2020 13:30:58 +0000 (13:30 +0000)
committerSam Tebbs <samuel.tebbs@arm.com>
Mon, 9 Nov 2020 15:03:48 +0000 (15:03 +0000)
commit40a3f7e48d6bac6702357636a5f5c351415ed050
tree85a1b3ef51e6050440e9f03514a06a9a65f4506b
parent6e8a8c2d7e6c5091ee5c838e8cafafa72dbfca59
[ARM][LowOverheadLoops] Merge a VCMP and the new VPST into a VPT

There were cases where a VCMP and a VPST were merged even if the VCMP
didn't have the same defs of its operands as the VPST. This is fixed by
adding RDA checks for the defs. This however gave rise to cases where
the new VPST created would precede the un-merged VCMP and so would fail
a predicate mask assertion since the VCMP wasn't predicated. This was
solved by converting the VCMP to a VPT instead of inserting the new
VPST.

Differential Revision: https://reviews.llvm.org/D90461
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
llvm/test/CodeGen/Thumb2/LowOverheadLoops/vcmp-vpst-combination.ll