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

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 15:11:45 PDT 2016

mkuper added a comment.

Looks like we used to use the return value of getSameBlock() before r185774.
But yeah, no reason for that anymore.

LGTM with a nit.

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;
As long as you're touching this, can we just
assert((allConstant(VL) || allSameType(VL)) && "Invalid types!")


More information about the llvm-commits mailing list