-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[PowerPC] Add phony subregisters to cover the high half of the VSX registers. #94628
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
Changes from all commits
df7fbbf
5173f7f
f2a2eec
bb20b4c
b06ddd7
deda75f
e17c8f8
2b00e8f
fe33901
c1ef2be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -750,25 +750,21 @@ entry: | |
define <2 x double> @testDoubleImm1(<2 x double> %a, double %b) { | ||
; CHECK-64-LABEL: testDoubleImm1: | ||
; CHECK-64: # %bb.0: # %entry | ||
; CHECK-64-NEXT: # kill: def $f1 killed $f1 def $vsl1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this looks like degradation.
The
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think f1/vsl1 is killed at the COPY, not before, so that this identity COPY is replaced by a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I took a look at this and the copy has changed which is why the kill is no longer emitted.
After the change:
Basically, we are missing the A few more details here. This is as intended. As you mentioned, the kill is added by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Maybe the implicit-def is still necessary at least for the case where the other part of the super register is not allocatable, i.e., once f1 is defined, the vsl1 should also be defined as the phony part can not be allocated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the phony lane isn't alive at the COPY, I think it's ok we don't have the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think that is what is happening here. I took a look at one of the smaller tests
The only reason we use the VSRC register is because that is the type of register that XXPERMDI requires. The other lane is never used and the value in |
||
; CHECK-64-NEXT: xxpermdi 34, 1, 34, 1 | ||
; CHECK-64-NEXT: blr | ||
; | ||
; CHECK-32-LABEL: testDoubleImm1: | ||
; CHECK-32: # %bb.0: # %entry | ||
; CHECK-32-NEXT: # kill: def $f1 killed $f1 def $vsl1 | ||
; CHECK-32-NEXT: xxpermdi 34, 1, 34, 1 | ||
; CHECK-32-NEXT: blr | ||
; | ||
; CHECK-64-P10-LABEL: testDoubleImm1: | ||
; CHECK-64-P10: # %bb.0: # %entry | ||
; CHECK-64-P10-NEXT: # kill: def $f1 killed $f1 def $vsl1 | ||
; CHECK-64-P10-NEXT: xxpermdi 34, 1, 34, 1 | ||
; CHECK-64-P10-NEXT: blr | ||
; | ||
; CHECK-32-P10-LABEL: testDoubleImm1: | ||
; CHECK-32-P10: # %bb.0: # %entry | ||
; CHECK-32-P10-NEXT: # kill: def $f1 killed $f1 def $vsl1 | ||
; CHECK-32-P10-NEXT: xxpermdi 34, 1, 34, 1 | ||
; CHECK-32-P10-NEXT: blr | ||
entry: | ||
|
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.
This isArtificial field looks undocumented in Target.td, can you add some description to it?
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! I have added a comment.
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 more meant it needs docs in Target.td, not just this one use