[ARM] Update check for CBZ in Ifcvt
authorDavid Green <david.green@arm.com>
Tue, 23 Apr 2019 12:11:26 +0000 (12:11 +0000)
committerDavid Green <david.green@arm.com>
Tue, 23 Apr 2019 12:11:26 +0000 (12:11 +0000)
commitc519d3c403986b5e91e68c3788f1485d8072392a
tree131684255a416133d0ff5005b7014e2bac1ac014
parent4eda12aea51ba0600c07d5fe1584607e286600bf
[ARM] Update check for CBZ in Ifcvt

The check for creating CBZ in constant island pass recently obtained the
ability to search backwards to find a Cmp instruction. The code in IfCvt should
mirror this to allow more conversions to the smaller form. The common code has
been pulled out into a separate function to be shared between the two places.

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

llvm-svn: 358977
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/lib/Target/ARM/ARMBaseInstrInfo.h
llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
llvm/test/CodeGen/Thumb2/ifcvt-cbz.mir [new file with mode: 0644]