[PATCH] D51313: [LV] Fix code gen for conditionally executed uniform loads

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 5 12:23:38 PDT 2018


anna marked 2 inline comments as done.
anna added inline comments.


================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:6826
     if (isa<LoadInst>(I) || isa<StoreInst>(I)) {
-      assert(CM.getWideningDecision(I, VF) ==
-                 LoopVectorizationCostModel::CM_Scalarize &&
+      assert((CM.getWideningDecision(I, VF) !=
+                  LoopVectorizationCostModel::CM_Widen &&
----------------
hsaito wrote:
> Same as Line 4404.
I believe it does not apply here. We specifically *need* to check for widening decisions. At this point, the decision can be CM_GATHERSCATTER or a widening decision (if we hadn't called `tryToWidenMemory` and fail this assert). We will never get CM_Scalarize here because of the check at line 6747.

So, I think this assert is pretty clear in that aspect.


Repository:
  rL LLVM

https://reviews.llvm.org/D51313





More information about the llvm-commits mailing list