[PATCH] D94015: [LoopIdiom] Replace cttz loop by call to cttz intrinsic.

Dawid Jurczak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 07:12:31 PDT 2022


yurai007 added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp:1972
+  // br i1 %cmp1, label %while.body, label %while.end
+  ssize_t IdiomCanonicalSize = 5;
+  BasicBlock *LoopHeader = CurLoop->getHeader();
----------------
nit: const


================
Comment at: llvm/test/Transforms/LoopIdiom/cttz.ll:67
+}
\ No newline at end of file

----------------
Would it make sense to add some negative tests covering scenarios when pattern is (as expected) not recognized?


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

https://reviews.llvm.org/D94015



More information about the llvm-commits mailing list