[PATCH] D118102: [LoopInterchange] WIP: Prevent interchange with unsafe control-flow divergence inside inner loops (PR48057)

Congzhe Cao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 8 17:58:44 PST 2022


congzhe updated this revision to Diff 407018.
congzhe retitled this revision from "[LoopInterchange] Prevent interchange with unsafe control-flow divergence inside inner loops (PR48057)" to "[LoopInterchange] WIP: Prevent interchange with unsafe control-flow divergence inside inner loops (PR48057)".

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

https://reviews.llvm.org/D118102

Files:
  llvm/lib/Transforms/Scalar/LoopInterchange.cpp


Index: llvm/lib/Transforms/Scalar/LoopInterchange.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+++ llvm/lib/Transforms/Scalar/LoopInterchange.cpp
@@ -120,7 +120,7 @@
       std::vector<char> Dep;
       Instruction *Src = cast<Instruction>(*I);
       Instruction *Dst = cast<Instruction>(*J);
-      if (Src == Dst)
+      if (I != J && Src == Dst)
         continue;
       // Ignore Input dependencies.
       if (isa<LoadInst>(Src) && isa<LoadInst>(Dst))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118102.407018.patch
Type: text/x-patch
Size: 537 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220209/ad7330ad/attachment.bin>


More information about the llvm-commits mailing list