Skip to content

Commit 25b90c4

Browse files
committed
[SandboxVec][SeedCollector][NFC] Remove redundant 'else' and move the assertion within the 'if'
1 parent 85711bd commit 25b90c4

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)