[PATCH] D136463: [SWP] Recognize mem carried dep with different base

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 24 09:32:29 PDT 2022


thopre marked an inline comment as done.
thopre added inline comments.


================
Comment at: llvm/lib/CodeGen/MachinePipeliner.cpp:2301
   int D = 0;
-  if (!LoopDef || !TII->getIncrementValue(*LoopDef, D))
+  if (!LoopDefS || !TII->getIncrementValue(*LoopDefS, D))
     return true;
----------------
bcahoon wrote:
> I don't think this is needed because computeDelta performs this check. However, this isn't really related to your change...
Do you want me to remove that then?


================
Comment at: llvm/test/CodeGen/Hexagon/swp-carried-dep3.mir:14
+# CHECK-NEXT: SU(5)
+# CHECK-NEXT: SU(7)
+
----------------
bcahoon wrote:
> It looks like this is the same output without your patch. Can you add a test, or change this one, that shows the effect of the patch?
I had checked that the code was being hit with the earlier version of the testcase but hadn't really understood the CHECK lines. I've verify that the updated test does indeed show a difference with and without the patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136463



More information about the llvm-commits mailing list