]> granicus.if.org Git - llvm/commit
[ARM] Comply with rules on ARMv8-A thumb mode partial deprecation of IT.
authorHuihui Zhang <huihuiz@quicinc.com>
Tue, 18 Jun 2019 20:55:09 +0000 (20:55 +0000)
committerHuihui Zhang <huihuiz@quicinc.com>
Tue, 18 Jun 2019 20:55:09 +0000 (20:55 +0000)
commitd8ca88c062f0d5a0c475570797513aec38ff2a82
tree3e428fb0279c5b83a562b7a359358fc63d6a2199
parent7f53b8e34b6af8b2e647d25b3ef9aea0d0f77639
[ARM] Comply with rules on ARMv8-A thumb mode partial deprecation of IT.

Summary:
When identifing instructions that can be folded into a MOVCC instruction,
checking for a predicate operand is not enough, also need to check for
thumb2 function, with restrict-IT, is the machine instruction eligible for
ARMv8 IT or not.

Notes in ARMv8-A Architecture Reference Manual, section "Partial deprecation of IT"
  https://usermanual.wiki/Pdf/ARM20Architecture20Reference20ManualARMv8.1667877052.pdf

"ARMv8-A deprecates some uses of the T32 IT instruction. All uses of IT that apply to
instructions other than a single subsequent 16-bit instruction from a restricted set
are deprecated, as are explicit references to the PC within that single 16-bit
instruction. This permits the non-deprecated forms of IT and subsequent instructions
to be treated as a single 32-bit conditional instruction."

Reviewers: efriedma, lebedev.ri, t.p.northover, jmolloy, aemerson, compnerd, stoklund, ostannard

Reviewed By: ostannard

Subscribers: ostannard, javed.absar, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363739 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseInstrInfo.cpp
lib/Target/ARM/ARMBaseInstrInfo.h
test/CodeGen/ARM/2014-08-04-muls-it.ll
test/CodeGen/ARM/CGP/arm-cgp-icmps.ll
test/CodeGen/ARM/CGP/arm-cgp-signed-icmps.ll
test/CodeGen/ARM/arm-and-tst-peephole.ll
test/CodeGen/ARM/hoist-and-by-const-from-lshr-in-eqcmp-zero.ll
test/CodeGen/ARM/hoist-and-by-const-from-shl-in-eqcmp-zero.ll
test/CodeGen/Thumb2/v8_deprecate_IT.ll [new file with mode: 0644]