[llvm] [PowerPC] Correct toc_entry pattern in ADDIStocHA (PR #93905)

Sean Fertile via llvm-commits llvm-commits at lists.llvm.org
Fri May 31 12:45:13 PDT 2024


================
@@ -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))]>;
----------------
mandlebug wrote:

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.

https://github.com/llvm/llvm-project/pull/93905


More information about the llvm-commits mailing list