[PATCH] D22867: [LV] Mark scalarized GEPs uniform

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 10:38:02 PDT 2016


anemet added inline comments.

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:1518-1519
@@ -1506,4 +1517,4 @@
 
   /// Collect the variables that need to stay uniform after vectorization.
   void collectLoopUniforms();
 
----------------
I was looking at this code recently and was surprised to see that we never actually describe what uniformity is (especially because we use it for other things than just loop-invariant addresses).  As a first step, would you mind filling this gap?

My take is that we currently call something uniform if we don't need to generate values for each horizontal value in a vector loop iteration, more precisely we only need to generate the first one.  This is true for a few things: the induction variable, loop-invariant addresses, pointers for consecutive accesses (because the vector access instruction implicitly generates the horizontal addresses).


https://reviews.llvm.org/D22867





More information about the llvm-commits mailing list