Skip to content

Commit 2d1df22

Browse files
Vasileios Porpodasgithub-actions[bot]
authored andcommitted
Automerge: [SandboxVec][SeedCollector][NFC] Remove redundant 'else' and move the assertion within the 'if'
2 parents 18a70b3 + 25b90c4 commit 2d1df22

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/Transforms/Vectorize/SandboxVectorizer/SeedCollector.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ ArrayRef<Instruction *> SeedBundle::getSlice(unsigned StartIdx,
6767
BitCount = BitCountPowerOfTwo;
6868
}
6969

70-
assert((!ForcePowerOf2 || isPowerOf2_32(BitCount)) &&
71-
"Must be a power of two");
7270
// Return any non-empty slice
73-
if (NumElements > 1)
71+
if (NumElements > 1) {
72+
assert((!ForcePowerOf2 || isPowerOf2_32(BitCount)) &&
73+
"Must be a power of two");
7474
return ArrayRef<Instruction *>(&Seeds[StartIdx], NumElements);
75-
else
76-
return {};
75+
}
76+
return {};
7777
}
7878

7979
template <typename LoadOrStoreT>

0 commit comments

Comments
 (0)