[PATCH] D24008: [SLP] Return a boolean value for these static helpers. NFC.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 15:15:31 PDT 2016

mcrosier accepted this revision.
mcrosier added a reviewer: mcrosier.
mcrosier marked an inline comment as done.
mcrosier added a comment.
This revision is now accepted and ready to land.

Approving per @mkuper's comment.

Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:978
@@ -977,2 +977,3 @@
 void BoUpSLP::buildTree_rec(ArrayRef<Value *> VL, unsigned Depth) {
-  bool SameTy = allConstant(VL) || getSameType(VL); (void)SameTy;
+  bool SameTy = allConstant(VL) || allSameType(VL);
+  (void)SameTy;
mkuper wrote:
> As long as you're touching this, can we just
> assert((allConstant(VL) || allSameType(VL)) && "Invalid types!")
> Instead?
Sure. Thanks for pointing this out.


More information about the llvm-commits mailing list