We have the patterns to fold 2 RLWINMs in ppc-mi-peephole, while some RLWINM will be generated after RA, for example https://reviews.llvm.org/rGc4690b007743d2f564bc1156fdbdbcaad2adddcc. 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.
Details
Details
- Reviewers
steven.zhang shchenz qiucf jsji nemanjai - Group Reviewers
Restricted Project - Commits
- rGb969dfe26f41: [NFC][PowerPC] Move the folding RLWINMs from ppc-mi-peephole to PPCInstrInfo.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Time | Test | |
---|---|---|
370 ms | linux > HWAddressSanitizer-x86_64.TestCases::sizes.cpp |
Event Timeline
Comment Actions
Thanks for trying to extend it for post-RA. This makes sense to me as some RLWINM will be generated after RA. One nit and please also fix the lint suggestions.
llvm/lib/Target/PowerPC/PPCInstrInfo.cpp | ||
---|---|---|
3192 | I think a more general name for this function would be better for later extension? For example simplifyRotateAndMaskInstr() |
I think a more general name for this function would be better for later extension? For example simplifyRotateAndMaskInstr()