[PowerPC] add a new pass to expand ctr loop pseudos
authorChen Zheng <czhengsz@cn.ibm.com>
Fri, 8 Apr 2022 07:16:05 +0000 (03:16 -0400)
committerChen Zheng <czhengsz@cn.ibm.com>
Tue, 21 Jun 2022 02:57:24 +0000 (22:57 -0400)
commita71fe49bb534fda18edf57284e16d1705fc54879
tree7112bea9d039dc29ab865363b3d7a5229b55c46f
parent16d3a82de53dab4bb5ed468aff92df276f8a6e39
[PowerPC] add a new pass to expand ctr loop pseudos

This patch implements a new way to generate the CTR loops. Now the
intrinsics inserted in hardware loop pass will be mapped to pseudo
instructions and these pseudo instructions will be expanded to CTR
loop or normal compare+branch loop in this post ISEL pass.

Reviewed By: lkail

Differential Revision: https://reviews.llvm.org/D122125
llvm/lib/Target/PowerPC/CMakeLists.txt
llvm/lib/Target/PowerPC/PPC.h
llvm/lib/Target/PowerPC/PPCCTRLoops.cpp [new file with mode: 0644]
llvm/lib/Target/PowerPC/PPCInstr64Bit.td
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
llvm/test/CodeGen/PowerPC/O3-pipeline.ll
llvm/test/CodeGen/PowerPC/ctrloops32.mir [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/ctrloops64.mir [new file with mode: 0644]