File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -937,15 +937,16 @@ std::vector<Chain> Vectorizer::splitChainByAlignment(Chain &C) {
937937 // the next power-of-2
938938 Chain ExtendingLoadsStores;
939939 if (NumVecElems < TargetVF && !isPowerOf2_32 (NumVecElems) &&
940- VecElemBits >= 8 && isPowerOf2_32 (TargetVF) ) {
940+ VecElemBits >= 8 ) {
941941 // TargetVF may be a lot higher than NumVecElems,
942942 // so only extend to the next power of 2.
943943 assert (VecElemBits % 8 == 0 );
944944 unsigned VecElemBytes = VecElemBits / 8 ;
945945 unsigned NewNumVecElems = PowerOf2Ceil (NumVecElems);
946946 unsigned NewSizeBytes = VecElemBytes * NewNumVecElems;
947947
948- assert (NewNumVecElems <= TargetVF);
948+ assert (isPowerOf2_32 (TargetVF) && " TargetVF expected to be a power of 2" );
949+ assert (NewNumVecElems <= TargetVF && " Should not extend past TargetVF" );
949950
950951 LLVM_DEBUG (dbgs () << " LSV: attempting to extend chain of "
951952 << NumVecElems << " "
You can’t perform that action at this time.
0 commit comments