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

David Majnemer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 16:57:08 PST 2017


majnemer added inline comments.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:3737-3745
+  TrackChanges &operator|=(bool C) {
+    if (C) {
+      if (const Loop *L = LI->getLoopFor(BB))
+        SE->forgetLoopDispositions(L);
+      Changed = true;
+    }
+    return *this;
----------------
In general, we don't use this sort of overloading in LLVM...


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:3745
+  }
+  operator bool() const { return Changed; }
+};
----------------
Probably should mark this as explicit.


https://reviews.llvm.org/D29641





More information about the llvm-commits mailing list