[PATCH] D24557: [Loop Vectorizer] Simplified GEP cloning. NFC.

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 16 10:32:53 PDT 2016


anemet added inline comments.

================
Comment at: ../lib/Transforms/Vectorize/LoopVectorize.cpp:2790-2791
@@ +2789,4 @@
+      Gep2->setName("gep.indvar");
+      for (unsigned i = 0; i < NumOperands; ++i)
+        Gep2->setOperand(i, getScalarValue(Gep->getOperand(i), 0, 0));
+      setDebugLocFromInst(Builder, Gep);
----------------
@delena, to be a bit more specific, the comment I would except to see here is something like:



> Let's create the uniform value of this GEP (i.e. lane 0 value).  The operands are either loop-invariant or consecutive (GEP pointer or induction-variable index). 
> 



@mssimpso, please check that I am not oversimplifying/missing some subtleties here again.


Repository:
  rL LLVM

https://reviews.llvm.org/D24557





More information about the llvm-commits mailing list