[PATCH] D91398: [LoopVectorizer] Lower uniform loads as a single load (instead of relying on CSE)

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 22 16:52:34 PST 2020


reames added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5039
   auto addToWorklistIfAllowed = [&](Instruction *I) -> void {
+    if (isOutOfScope(I)) {
+      LLVM_DEBUG(dbgs() << "LV: Found not uniform due to scope: "
----------------
anna wrote:
> Could this be turned into an assert and landed separately? I see all callers of `addToWorklistIfAllowed` either already checks for outOfScope or the instructions is already checked to be in loop.
The check is needed for case where a uniform pointer is defined outside the loop but used inside of it.  I could move the check to the caller, but the placement seems to make more sense here?


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

https://reviews.llvm.org/D91398



More information about the llvm-commits mailing list