[PATCH] D152366: [LoopVectorize] Allow inner loop runtime checks to be hoisted above an outer loop

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 09:36:28 PDT 2023


paulwalker-arm accepted this revision.
paulwalker-arm added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:352
+      LLVM_DEBUG(dbgs() << "LAA: Not creating diff runtime check, since these "
+                           " cannot be hoisted out of the outer loop\n");
+      CanUseDiffCheck = false;
----------------
This space is redundant because you've already got one at the end of the previous string.


================
Comment at: llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll:148
 ; DEBUG-LABEL: LAA: Found a loop in full_checks:
+; DEBUG-NOT: LAA: Not creating diff runtime check, since these cannot be hoisted out of the outer loop
 ; DEBUG: LAA: Adding RT check for range:
----------------
Up to you but long `NOT` lines like this are fragile. I think you'd be better off adding another `DEBUG` line to tryToCreateDiffCheck for the case when a diff check is created and then explicitly checking for the specific string you expect to see.


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

https://reviews.llvm.org/D152366



More information about the llvm-commits mailing list