[llvm] 1b47489 - [SLP] Use empty() instead of size() == 0. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu May 6 08:20:28 PDT 2021
Author: Simon Pilgrim
Date: 2021-05-06T16:20:18+01:00
New Revision: 1b47489fd0e1c3ddbeabb421b668b7bc623fd622
URL: https://github.com/llvm/llvm-project/commit/1b47489fd0e1c3ddbeabb421b668b7bc623fd622
DIFF: https://github.com/llvm/llvm-project/commit/1b47489fd0e1c3ddbeabb421b668b7bc623fd622.diff
LOG: [SLP] Use empty() instead of size() == 0. NFCI.
Added:
Modified:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 5e2a8a10207a..b538de636524 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -1636,7 +1636,7 @@ class BoUpSLP {
void setOperand(unsigned OpIdx, ArrayRef<Value *> OpVL) {
if (Operands.size() < OpIdx + 1)
Operands.resize(OpIdx + 1);
- assert(Operands[OpIdx].size() == 0 && "Already resized?");
+ assert(Operands[OpIdx].empty() && "Already resized?");
Operands[OpIdx].resize(Scalars.size());
for (unsigned Lane = 0, E = Scalars.size(); Lane != E; ++Lane)
Operands[OpIdx][Lane] = OpVL[Lane];
More information about the llvm-commits
mailing list