[PATCH] D68082: [LV] Emitting SCEV checks with OptForSize

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 28 08:03:15 PDT 2019


Ayal added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6378
 
+    // collectUniformsAndScalars (and setCostBasedWideningDecision) change
+    // SCEV behaviour, which we haven't seen before, so check again if we need
----------------
Better try to fix the issue at its core; isConsecutivePtr() should be conservative and avoid generating predicates under hasOptSize, by preventing getPtrStride() from doing so.
This may lead to successfully vectorizing the loop, albeit with a gather/scatter instead of a (speculative) vector load/store.


================
Comment at: llvm/test/Transforms/LoopVectorize/pr43371-optsize-scevchecks.ll:5
+
+define void @pr43371() optsize {
+;
----------------
Better try to augment existing optsize files with additional tests.


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

https://reviews.llvm.org/D68082





More information about the llvm-commits mailing list