[PATCH] D104636: [LoopIdiom] [LoopNest] let the pass deal with runtime memset size

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 25 07:15:41 PDT 2021


fhahn added inline comments.


================
Comment at: llvm/test/Transforms/LoopIdiom/memset-runtime.ll:36
+
+for.cond1.preheader:                              ; preds = %for.inc4, %entry
+  %i.017 = phi i64 [ 0, %entry ], [ %inc5, %for.inc4 ]
----------------
I'm not sure if I am missing something, but this test has just a single loop, so it's a 'trivial' loop nest, right?

 Couldn't this case be handled without making it a loop nest pass, by just checking if there's no parent loop? And even if there's a parent loop, wouldn't it also be possible to transform the inner loop to a wider memset, without the parents being perfectly nested?


================
Comment at: llvm/test/Transforms/LoopIdiom/memset-runtime.ll:1
+; The C code to generate this testcase:
+; void test(int *ar, long n)
----------------
eopXD wrote:
> lebedev.ri wrote:
> > Please use update script to autogenerate check lines
> I have never auto-generated check lines before. May I ask if there is some resource for me to explore this?
You can use the `llvm/utils/update_test_checks.py` script to automatically generate check lines.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104636



More information about the llvm-commits mailing list