-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[PowerPC] Remove DAG matching in ADDIStocHA #93905
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
Conversation
@llvm/pr-subscribers-backend-powerpc Author: Kai Luo (bzEq) Changes
Full diff: https://github.com/llvm/llvm-project/pull/93905.diff 1 Files Affected:
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td
index e3d6d2f094f2e..8697a98d7accb 100644
--- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td
@@ -3345,7 +3345,7 @@ def LWZtocL : PPCEmitTimePseudo<(outs gprc:$rD), (ins tocentry32:$disp, gprc_nor
def ADDIStocHA : PPCEmitTimePseudo<(outs gprc:$rD), (ins gprc_nor0:$reg, tocentry32:$disp),
"#ADDIStocHA",
[(set i32:$rD,
- (PPCtoc_entry i32:$reg, tglobaladdr:$disp))]>;
+ (PPCtoc_entry tglobaladdr:$disp, i32:$reg))]>;
// TOC Data Transform on AIX
def ADDItoc : PPCEmitTimePseudo<(outs gprc:$rD), (ins tocentry32:$disp, gprc:$reg),
"#ADDItoc",
|
@@ -3345,7 +3345,7 @@ def LWZtocL : PPCEmitTimePseudo<(outs gprc:$rD), (ins tocentry32:$disp, gprc_nor | |||
def ADDIStocHA : PPCEmitTimePseudo<(outs gprc:$rD), (ins gprc_nor0:$reg, tocentry32:$disp), | |||
"#ADDIStocHA", | |||
[(set i32:$rD, | |||
(PPCtoc_entry i32:$reg, tglobaladdr:$disp))]>; | |||
(PPCtoc_entry tglobaladdr:$disp, i32:$reg))]>; |
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.
Since we need to transform the PPCtoc_entry node into 2 new nodes for large code model we do the transformation directly in PPCDAGToDAGISel::Select
and so the match pattern here isn't used and can be removed.
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.
Do we confirm the pattern is not used? @bzEq I saw there are LIT changes...
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 scheudling is changed. Since the machineinstr succeeds the attributes from the source SDAG node from the pattern. If the pattern is removed, the machineinstr loses these attributes. For PPCtoc_entry
, the attributes are
SDNPMayLoad, SDNPMemOperand
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.
OK. I think marking ADDIStocHA without load/store attributes is the right behavior.
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.
LGTM.
No description provided.