Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PowerPC] Extend folding RLWINM + RLWINM to post-RA. #67293

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EsmeYi
Copy link
Contributor

@EsmeYi EsmeYi commented Sep 25, 2023

This PR is migrated from Phabricator https://reviews.llvm.org/D89855.
We have patterns folding 2 RLWINMs in ppc-mi-peephole, while some RLWINM will be generated after RA, for example rGc4690b007743. We expect the optimization will also be performed for the RLWINM generated after RA followed by another RLWINM.

@bzEq
Copy link
Collaborator

bzEq commented Sep 26, 2023

CI is failing, please check.

@@ -160,8 +160,7 @@ define i32 @xvtdivdp_shift(<2 x double> %a, <2 x double> %b) {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xvtdivdp cr0, v2, v3
; CHECK-NEXT: mfocrf r3, 128
; CHECK-NEXT: srwi r3, r3, 28
; CHECK-NEXT: rlwinm r3, r3, 28, 31, 31
; CHECK-NEXT: li r3, 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is less than ideal. We seem to be able to prove that the result of the xvtdivdp is unused, but we don't eliminate it or the move from CR - both expensive instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants