-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[PowerPC] custom lower v1024i1 load/store #126969
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 | ||
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \ | ||
; RUN: -mcpu=future -ppc-asm-full-reg-names \ | ||
; RUN: -ppc-vsr-nums-as-vr < %s | FileCheck %s | ||
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \ | ||
; RUN: -mcpu=future -ppc-asm-full-reg-names \ | ||
; RUN: -ppc-vsr-nums-as-vr < %s | FileCheck %s --check-prefix=CHECK-BE | ||
|
||
define void @v1024ls(ptr nocapture readonly %vqp, ptr nocapture %resp) { | ||
; CHECK-LABEL: v1024ls: | ||
; CHECK: # %bb.0: # %entry | ||
; CHECK-NEXT: lxvp vsp34, 0(r3) | ||
; CHECK-NEXT: lxvp vsp36, 32(r3) | ||
; CHECK-NEXT: dmxxinstfdmr512 wacc_hi0, vsp36, vsp34, 1 | ||
; CHECK-NEXT: lxvp vsp34, 64(r3) | ||
; CHECK-NEXT: lxvp vsp36, 96(r3) | ||
; CHECK-NEXT: dmxxinstfdmr512 wacc0, vsp36, vsp34, 0 | ||
; CHECK-NEXT: dmxxextfdmr512 wacc0, vsp34, vsp36, 0 | ||
; CHECK-NEXT: stxvp vsp34, 96(r4) | ||
; CHECK-NEXT: stxvp vsp36, 64(r4) | ||
; CHECK-NEXT: dmxxextfdmr512 wacc_hi0, vsp34, vsp36, 1 | ||
; CHECK-NEXT: stxvp vsp34, 32(r4) | ||
; CHECK-NEXT: stxvp vsp36, 0(r4) | ||
; CHECK-NEXT: blr | ||
; | ||
; CHECK-BE-LABEL: v1024ls: | ||
; CHECK-BE: # %bb.0: # %entry | ||
; CHECK-BE-NEXT: lxvp vsp34, 96(r3) | ||
; CHECK-BE-NEXT: lxvp vsp36, 64(r3) | ||
; CHECK-BE-NEXT: dmxxinstfdmr512 wacc_hi0, vsp36, vsp34, 1 | ||
; CHECK-BE-NEXT: lxvp vsp34, 32(r3) | ||
; CHECK-BE-NEXT: lxvp vsp36, 0(r3) | ||
; CHECK-BE-NEXT: dmxxinstfdmr512 wacc0, vsp36, vsp34, 0 | ||
; CHECK-BE-NEXT: dmxxextfdmr512 wacc_hi0, vsp34, vsp36, 1 | ||
; CHECK-BE-NEXT: stxvp vsp36, 96(r4) | ||
; CHECK-BE-NEXT: stxvp vsp34, 64(r4) | ||
; CHECK-BE-NEXT: dmxxextfdmr512 wacc0, vsp34, vsp36, 0 | ||
; CHECK-BE-NEXT: stxvp vsp36, 32(r4) | ||
; CHECK-BE-NEXT: stxvp vsp34, 0(r4) | ||
; CHECK-BE-NEXT: blr | ||
entry: | ||
%0 = load <1024 x i1>, ptr %vqp, align 64 | ||
store <1024 x i1> %0, ptr %resp, align 64 | ||
ret void | ||
} | ||
|
||
declare <1024 x i1> @llvm.ppc.mma.dmsetdmrz() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be within the
if (Subtarget.hasMMA())
block on line 1357? I am basing this on the fact that we needhadMMA()
for this support.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to PPC.cpp future CPU should include all of the features of Power11, and Power11 includes all the same features as Power10 where mma feature is set to true for Power10, so I think isISAFuture implies hasMMA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the checks of isISAFuture should I think be interpreted as placeholders. At some point a concrete target processor needs to be added and at that point all the checks for future should be updated to check specific features rather than just future - "future + 1" would also have those features but a check for future would fail.
Also for that reason I think the single condition is more correct, since we should be asking about one feature and not a cpu name in addition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes Power11 implies hasMMA. I was more thinking of issues where users manually turn on/off features on a specific CPU. This patch uses
lxvp|stvp
, so if user explicitly turn offmma
orpaired-vector-memops
we shouldn't be generating these code.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that you have the guards in the custom lowering functions though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the checks are inconsistent. I could make them consistent. The final switching code is TBD because the target features are TBD.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For paired support not being there, I think hitting the assert is better. It would be a case of manually forcing it off since ISA level supports it.