[PATCH] D29641: [SLP] Fix for PR31847: Assertion failed: (isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant!")

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 09:18:36 PDT 2017


ABataev marked 2 inline comments as done.
ABataev added inline comments.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1327
+      eraseInstruction(I);
+  });
+}
----------------
RKSimon wrote:
> What do we gain from using std::for_each instead of basic range for loops here and in ~BoUpSLP()?
Nothing special, chnged it.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:4736
+      }
+      return Builder.CreateSelect(Cmp, LHS, RHS, Name);
+    }
----------------
RKSimon wrote:
> Would it be better to move the return into each min/max case, drop the RK_None case and just have the llvm_unreachable at the end of the function?
> 
> Similar question for initReductionOps / addReductionOps below
Ok, reworked.


https://reviews.llvm.org/D29641





More information about the llvm-commits mailing list