[llvm] [PowerPC] Add DMR and WACC COPY support (PR #149129)

Maryam Moghadas via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 21 08:37:41 PDT 2025


================
@@ -122,6 +122,33 @@ namespace {
           // Transform the original copy into a subregister extraction copy.
           SrcMO.setReg(NewVReg);
           SrcMO.setSubReg(PPC::sub_64);
+        } else if (IsRegInClass(DstMO.getReg(), &PPC::WACC_HIRCRegClass, MRI) &&
+                   IsRegInClass(SrcMO.getReg(), &PPC::WACCRCRegClass, MRI)) {
+	  // Matches the pattern:
+	  //   %a:waccrc = COPY %b.sub_wacc_hi:dmrrc
+	  //   %c:wacc_hirc = COPY %a:waccrc
+	  // And replaces it with:
+	  //   %c:wacc_hirc = COPY %b.sub_wacc_hi:dmrrc
----------------
maryammo wrote:

I will run this through clang-format. Since it modifies this file significantly, I kept it for after the review is done.

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


More information about the llvm-commits mailing list