[PATCH] D108011: [MachineCopyPropagation] Check CrossCopyRegClass for cross-class copys

Vang Thao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 31 10:15:17 PDT 2021


vangthao added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineCopyPropagation.cpp:428
+  // instruction in later passes.
+  if (CopySrcRC != CrossCopyRC) {
+    const TargetRegisterClass *CopyDstRC =
----------------
arsenm wrote:
> I suspect you don't really want an exact class match, and probably should be checking if one is a subclass of the other
Would it be needed in this case? If a different register class is not needed for the copy then getCrossCopyRegClass() should return the same exact class and we can check for the exact match.

Although I think UseDstRC and CopyDstRC can be a subclass of CrossCopyRC or vice versa.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108011/new/

https://reviews.llvm.org/D108011



More information about the llvm-commits mailing list