[PATCH] D20474: when calculating RegUsages, ignore instructions which are uniformed after vectorization

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 15:00:30 PDT 2016


mkuper added inline comments.

================
Comment at: lib/Transforms/Vectorize/LoopVectorize.cpp:6175
@@ -6174,4 +6174,3 @@
 
-  // Ignore induction phis that are only used in either GetElementPtr or ICmp
-  // instruction to exit loop. Induction variables usually have large types and
-  // can have big impact when estimating register usage.
+  // Ignore induction phis that are only used in either GetElementPtr or
+  // Uniform instruction since we don't need vector versions for such induction
----------------
wmi wrote:
> mkuper wrote:
> > This isn't directly related to this patch - but wouldn't this be true only for consecutive GEPs? (e.g. see D20789)
> Every GEP (no matter it is consecutive or not) will be scalarized. It is not related with the load/store using the GEP.  If the induction variable is only used in GEP, it will not be vectorized, right?  
I don't think so - as far as I know, we should be creating vector GEPs for scatter/gather when it's profitable on the target. (I think the only target that supports it right now is AVX-512.)


Repository:
  rL LLVM

http://reviews.llvm.org/D20474





More information about the llvm-commits mailing list