[PATCH] D28907: [SLP] Fix for PR30787: Failure to beneficially vectorize 'copyable' elements in integer binary ops.

Dinar Temirbulatov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 19 17:56:15 PDT 2017


dtemirbulatov added inline comments.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1263
+    const unsigned AltOpcode = getAltOpcode(Opcode);
     for (int Lane = 0, LE = Entry->Scalars.size(); Lane != LE; ++Lane) {
       Value *Scalar = Entry->Scalars[Lane];
----------------
RKSimon wrote:
> for (auto *Scalar : Entry->Scalars)
> 
> As a NFC pre-commit if possible
hmm, we actually need "Lane" variable in logic below.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:3267
+    const unsigned AltOpcode = getAltOpcode(Opcode);
     for (int Lane = 0, LE = Entry->Scalars.size(); Lane != LE; ++Lane) {
       Value *Scalar = Entry->Scalars[Lane];
----------------
RKSimon wrote:
> for (auto *Scalar : Entry->Scalars)
> 
> Possibly as a NFC pre-commit.
"Lane" variable is required in the code below.


https://reviews.llvm.org/D28907





More information about the llvm-commits mailing list