[NFC][PowerPC] Move the folding RLWINMs from ppc-mi-peephole to PPCInstrInfo.
authorEsme-Yi <esme.yi@ibm.com>
Tue, 3 Nov 2020 06:28:56 +0000 (06:28 +0000)
committerEsme-Yi <esme.yi@ibm.com>
Tue, 3 Nov 2020 06:28:56 +0000 (06:28 +0000)
commitb969dfe26f41ce0373a9e1542ebd4cfb0e6a2c25
treef43d8931fff80382c5553b95811cccd0a6210a86
parent855a32d9e55932885759979361b353c63def84c8
[NFC][PowerPC] Move the folding RLWINMs from ppc-mi-peephole to PPCInstrInfo.

Summary: We have the patterns to fold 2 RLWINMs in ppc-mi-peephole, while some RLWINM will be generated after RA, for example D88274. If the RLWINM generated after RA followed by another RLWINM, we expect to perform the optimization after RA, too.
This is a NFC patch to move the folding patterns to PPCInstrInfo, and the follow-up works will be calling it in pre-emit-peephole and expand the patterns to handle more cases.

Reviewed By: shchenz

Differential Revision: https://reviews.llvm.org/D89846
llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
llvm/lib/Target/PowerPC/PPCInstrInfo.h
llvm/lib/Target/PowerPC/PPCMIPeephole.cpp