[llvm] [PowerPC] Correct toc_entry pattern in ADDIStocHA (PR #93905)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 17:37:22 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-powerpc
Author: Kai Luo (bzEq)
<details>
<summary>Changes</summary>
`TOC_ENTRY` node is created with `{GA, Reg}` operands, the pattern in `ADDIStocHA` is inconsistent.
---
Full diff: https://github.com/llvm/llvm-project/pull/93905.diff
1 Files Affected:
- (modified) llvm/lib/Target/PowerPC/PPCInstrInfo.td (+1-1)
``````````diff
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",
``````````
</details>
https://github.com/llvm/llvm-project/pull/93905
More information about the llvm-commits
mailing list